Trait nannou::color::Component [−][src]
pub trait Component: Copy + Zero + PartialOrd<Self> + NumCast { pub const LIMITED: bool; pub fn max_intensity() -> Self; pub fn convert<T>(&self) -> T
where
T: Component; }
Common trait for color components.
Associated Constants
pub const LIMITED: bool
[src]
True if the max intensity is also the highest possible value of the type. Conversion to limited types requires clamping.
Required methods
pub fn max_intensity() -> Self
[src]
The highest displayable value this component type can reach. Higher values are allowed, but they may be lowered to this before converting to another format.
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
Convert into another color component type, including scaling.
Implementations on Foreign Types
impl Component for f64
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> f64
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
impl Component for u16
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> u16
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
impl Component for u64
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> u64
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
impl Component for f32
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> f32
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
impl Component for u32
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> u32
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,
impl Component for u8
[src]
pub const LIMITED: bool
[src]
pub fn max_intensity() -> u8
[src]
pub fn convert<T>(&self) -> T where
T: Component,
[src]
T: Component,