Trait color::Channel [−][src]
pub trait Channel: Copy + Sized + PartialOrd + PartialEq + Num + NumCast { fn from<T: Channel>(chan: T) -> Self; fn to_channel_u8(self) -> u8; fn to_channel_u16(self) -> u16; fn to_channel_f32(self) -> f32; fn to_channel_f64(self) -> f64; fn invert_channel(self) -> Self; fn max() -> Self; fn to_channel<T: Channel>(self) -> T { ... } fn clamp(self, lo: Self, hi: Self) -> Self { ... } fn normalized_mul(self, rhs: Self) -> Self { ... } fn normalized_div(self, rhs: Self) -> Self { ... } fn mix(self, rhs: Self, value: Self) -> Self { ... } }
Required Methods
fn from<T: Channel>(chan: T) -> Self
fn to_channel_u8(self) -> u8
fn to_channel_u16(self) -> u16
fn to_channel_f32(self) -> f32
fn to_channel_f64(self) -> f64
fn invert_channel(self) -> Self
fn max() -> Self
Provided Methods
fn to_channel<T: Channel>(self) -> T
fn clamp(self, lo: Self, hi: Self) -> Self
fn normalized_mul(self, rhs: Self) -> Self
fn normalized_div(self, rhs: Self) -> Self
fn mix(self, rhs: Self, value: Self) -> Self
Implementations on Foreign Types
impl Channel for u8
[src]
impl Channel for u8
fn from<T: Channel>(chan: T) -> u8
[src]
fn from<T: Channel>(chan: T) -> u8
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u8(self) -> u8
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u16(self) -> u16
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f32(self) -> f32
fn to_channel_f64(self) -> f64
[src]
fn to_channel_f64(self) -> f64
fn invert_channel(self) -> u8
[src]
fn invert_channel(self) -> u8
fn max() -> u8
[src]
fn max() -> u8
fn to_channel<T: Channel>(self) -> T
[src]
fn to_channel<T: Channel>(self) -> T
fn clamp(self, lo: Self, hi: Self) -> Self
[src]
fn clamp(self, lo: Self, hi: Self) -> Self
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_mul(self, rhs: Self) -> Self
fn normalized_div(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn mix(self, rhs: Self, value: Self) -> Self
impl Channel for u16
[src]
impl Channel for u16
fn from<T: Channel>(chan: T) -> u16
[src]
fn from<T: Channel>(chan: T) -> u16
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u8(self) -> u8
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u16(self) -> u16
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f32(self) -> f32
fn to_channel_f64(self) -> f64
[src]
fn to_channel_f64(self) -> f64
fn invert_channel(self) -> u16
[src]
fn invert_channel(self) -> u16
fn max() -> u16
[src]
fn max() -> u16
fn to_channel<T: Channel>(self) -> T
[src]
fn to_channel<T: Channel>(self) -> T
fn clamp(self, lo: Self, hi: Self) -> Self
[src]
fn clamp(self, lo: Self, hi: Self) -> Self
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_mul(self, rhs: Self) -> Self
fn normalized_div(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn mix(self, rhs: Self, value: Self) -> Self
impl Channel for f32
[src]
impl Channel for f32
fn from<T: Channel>(chan: T) -> f32
[src]
fn from<T: Channel>(chan: T) -> f32
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u8(self) -> u8
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u16(self) -> u16
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f32(self) -> f32
fn to_channel_f64(self) -> f64
[src]
fn to_channel_f64(self) -> f64
fn invert_channel(self) -> f32
[src]
fn invert_channel(self) -> f32
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_mul(self, rhs: Self) -> Self
fn normalized_div(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
fn max() -> f32
[src]
fn max() -> f32
fn to_channel<T: Channel>(self) -> T
[src]
fn to_channel<T: Channel>(self) -> T
fn clamp(self, lo: Self, hi: Self) -> Self
[src]
fn clamp(self, lo: Self, hi: Self) -> Self
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn mix(self, rhs: Self, value: Self) -> Self
impl Channel for f64
[src]
impl Channel for f64
fn from<T: Channel>(chan: T) -> f64
[src]
fn from<T: Channel>(chan: T) -> f64
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u8(self) -> u8
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u16(self) -> u16
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f32(self) -> f32
fn to_channel_f64(self) -> f64
[src]
fn to_channel_f64(self) -> f64
fn invert_channel(self) -> f64
[src]
fn invert_channel(self) -> f64
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_mul(self, rhs: Self) -> Self
fn normalized_div(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
fn max() -> f64
[src]
fn max() -> f64
fn to_channel<T: Channel>(self) -> T
[src]
fn to_channel<T: Channel>(self) -> T
fn clamp(self, lo: Self, hi: Self) -> Self
[src]
fn clamp(self, lo: Self, hi: Self) -> Self
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn mix(self, rhs: Self, value: Self) -> Self