Trait agg::Color

source ·
pub trait Color: Debug + Copy {
    fn red(&self) -> f64;
    fn green(&self) -> f64;
    fn blue(&self) -> f64;
    fn alpha(&self) -> f64;
    fn red8(&self) -> u8;
    fn green8(&self) -> u8;
    fn blue8(&self) -> u8;
    fn alpha8(&self) -> u8;
    fn is_premultiplied(&self) -> bool;

    fn is_transparent(&self) -> bool { ... }
    fn is_opaque(&self) -> bool { ... }
}
Expand description

Access Color properties and compoents

Required Methods

Get red value [0,1] as f64

Get green value [0,1] as f64

Get blue value [0,1] as f64

Get alpha value [0,1] as f64

Get red value [0,255] as u8

Get green value [0,255] as u8

Get blue value [0,255] as u8

Get alpha value [0,255] as u8

Return if the color has been premultiplied

Provided Methods

Return if the color is completely transparent, alpha = 0.0

Return if the color is completely opaque, alpha = 1.0

Implementors