Struct RGBA
#[repr(C)]pub struct RGBA {
pub red: u8,
pub green: u8,
pub blue: u8,
pub alpha: u8,
}
Expand description
A color with red, green, blue, and alpha components, in a byte each.
Fields§
§red: u8
The red component.
green: u8
The green component.
blue: u8
The blue component.
alpha: u8
The alpha component.
Implementations§
§impl RGBA
impl RGBA
pub const BLACK: RGBA
pub const SILVER: RGBA
pub const GRAY: RGBA
pub const WHITE: RGBA
pub const MAROON: RGBA
pub const RED: RGBA
pub const PURPLE: RGBA
pub const FUCHSIA: RGBA
pub const GREEN: RGBA
pub const LIME: RGBA
pub const OLIVE: RGBA
pub const YELLOW: RGBA
pub const NAVY: RGBA
pub const BLUE: RGBA
pub const TEAL: RGBA
pub const AQUA: RGBA
pub const ALICEBLUE: RGBA
pub const ANTIQUEWHITE: RGBA
pub const AQUAMARINE: RGBA
pub const AZURE: RGBA
pub const BEIGE: RGBA
pub const BISQUE: RGBA
pub const BLANCHEDALMOND: RGBA
pub const BLUEVIOLET: RGBA
pub const BROWN: RGBA
pub const BURLYWOOD: RGBA
pub const CADETBLUE: RGBA
pub const CHARTREUSE: RGBA
pub const CHOCOLATE: RGBA
pub const CORAL: RGBA
pub const CORNFLOWERBLUE: RGBA
pub const CORNSILK: RGBA
pub const CRIMSON: RGBA
pub const CYAN: RGBA
pub const DARKBLUE: RGBA
pub const DARKCYAN: RGBA
pub const DARKGOLDENROD: RGBA
pub const DARKGRAY: RGBA
pub const DARKGREEN: RGBA
pub const DARKGREY: RGBA
pub const DARKKHAKI: RGBA
pub const DARKMAGENTA: RGBA
pub const DARKOLIVEGREEN: RGBA
pub const DARKORANGE: RGBA
pub const DARKORCHID: RGBA
pub const DARKRED: RGBA
pub const DARKSALMON: RGBA
pub const DARKSEAGREEN: RGBA
pub const DARKSLATEBLUE: RGBA
pub const DARKSLATEGRAY: RGBA
pub const DARKSLATEGREY: RGBA
pub const DARKTURQUOISE: RGBA
pub const DARKVIOLET: RGBA
pub const DEEPPINK: RGBA
pub const DEEPSKYBLUE: RGBA
pub const DIMGRAY: RGBA
pub const DIMGREY: RGBA
pub const DODGERBLUE: RGBA
pub const FIREBRICK: RGBA
pub const FLORALWHITE: RGBA
pub const FORESTGREEN: RGBA
pub const GAINSBORO: RGBA
pub const GHOSTWHITE: RGBA
pub const GOLD: RGBA
pub const GOLDENROD: RGBA
pub const GREENYELLOW: RGBA
pub const GREY: RGBA
pub const HONEYDEW: RGBA
pub const HOTPINK: RGBA
pub const INDIANRED: RGBA
pub const INDIGO: RGBA
pub const IVORY: RGBA
pub const KHAKI: RGBA
pub const LAVENDER: RGBA
pub const LAVENDERBLUSH: RGBA
pub const LAWNGREEN: RGBA
pub const LEMONCHIFFON: RGBA
pub const LIGHTBLUE: RGBA
pub const LIGHTCORAL: RGBA
pub const LIGHTCYAN: RGBA
pub const LIGHTGOLDENRODYELLOW: RGBA
pub const LIGHTGRAY: RGBA
pub const LIGHTGREEN: RGBA
pub const LIGHTGREY: RGBA
pub const LIGHTPINK: RGBA
pub const LIGHTSALMON: RGBA
pub const LIGHTSEAGREEN: RGBA
pub const LIGHTSKYBLUE: RGBA
pub const LIGHTSLATEGRAY: RGBA
pub const LIGHTSLATEGREY: RGBA
pub const LIGHTSTEELBLUE: RGBA
pub const LIGHTYELLOW: RGBA
pub const LIMEGREEN: RGBA
pub const LINEN: RGBA
pub const MAGENTA: RGBA
pub const MEDIUMAQUAMARINE: RGBA
pub const MEDIUMBLUE: RGBA
pub const MEDIUMORCHID: RGBA
pub const MEDIUMPURPLE: RGBA
pub const MEDIUMSEAGREEN: RGBA
pub const MEDIUMSLATEBLUE: RGBA
pub const MEDIUMSPRINGGREEN: RGBA
pub const MEDIUMTURQUOISE: RGBA
pub const MEDIUMVIOLETRED: RGBA
pub const MIDNIGHTBLUE: RGBA
pub const MINTCREAM: RGBA
pub const MISTYROSE: RGBA
pub const MOCCASIN: RGBA
pub const NAVAJOWHITE: RGBA
pub const OLDLACE: RGBA
pub const OLIVEDRAB: RGBA
pub const ORANGE: RGBA
pub const ORANGERED: RGBA
pub const ORCHID: RGBA
pub const PALEGOLDENROD: RGBA
pub const PALEGREEN: RGBA
pub const PALETURQUOISE: RGBA
pub const PALEVIOLETRED: RGBA
pub const PAPAYAWHIP: RGBA
pub const PEACHPUFF: RGBA
pub const PERU: RGBA
pub const PINK: RGBA
pub const PLUM: RGBA
pub const POWDERBLUE: RGBA
pub const REBECCAPURPLE: RGBA
pub const ROSYBROWN: RGBA
pub const ROYALBLUE: RGBA
pub const SADDLEBROWN: RGBA
pub const SALMON: RGBA
pub const SANDYBROWN: RGBA
pub const SEAGREEN: RGBA
pub const SEASHELL: RGBA
pub const SIENNA: RGBA
pub const SKYBLUE: RGBA
pub const SLATEBLUE: RGBA
pub const SLATEGRAY: RGBA
pub const SLATEGREY: RGBA
pub const SNOW: RGBA
pub const SPRINGGREEN: RGBA
pub const STEELBLUE: RGBA
pub const TAN: RGBA
pub const THISTLE: RGBA
pub const TOMATO: RGBA
pub const TURQUOISE: RGBA
pub const VIOLET: RGBA
pub const WHEAT: RGBA
pub const WHITESMOKE: RGBA
pub const YELLOWGREEN: RGBA
pub const TRANSPARENT: RGBA
pub const fn rgba(red: u8, green: u8, blue: u8, alpha: u8) -> RGBA
pub const fn rgba(red: u8, green: u8, blue: u8, alpha: u8) -> RGBA
Creates a new RGBA from RGBA values
pub fn r(&self) -> u8
pub fn g(&self) -> u8
pub fn b(&self) -> u8
pub fn a(&self) -> u8
Trait Implementations§
impl Copy for RGBA
impl StructuralPartialEq for RGBA
Auto Trait Implementations§
impl Freeze for RGBA
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.