pub struct XpColor {
pub r: u8,
pub g: u8,
pub b: u8,
}
Expand description
Structure representing the components of one color
Fields§
§r: u8
Red component 0..255
g: u8
Green component 0..255
b: u8
Blue component 0..255
Implementations§
Source§impl XpColor
impl XpColor
Sourcepub const TRANSPARENT: XpColor
pub const TRANSPARENT: XpColor
color 0xff00ff (hot pink) is regarded as transparent
Sourcepub fn is_transparent(self) -> bool
pub fn is_transparent(self) -> bool
Return whether this color is considered transparent (if this is the background color of a cell, the layer below it will see through)
Trait Implementations§
impl Copy for XpColor
impl Eq for XpColor
impl StructuralPartialEq for XpColor
Auto Trait Implementations§
impl Freeze for XpColor
impl RefUnwindSafe for XpColor
impl Send for XpColor
impl Sync for XpColor
impl Unpin for XpColor
impl UnwindSafe for XpColor
Blanket Implementations§
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