Trait color::Channel [−][src]
pub trait Channel: Copy + Sized + PartialOrd + PartialEq { type NearestFloat: Float + Channel;}Show methods
fn from<T: Channel>(chan: T) -> Self; fn to_channel_u8(self) -> u8; fn to_channel_u16(self) -> u16; fn to_channel_u32(self) -> u32; fn to_channel_f16(self) -> f16; fn to_channel_f32(self) -> f32; fn to_channel_f64(self) -> f64; fn to_nearest_precision_float(self) -> Self::NearestFloat; fn invert_channel(self) -> Self; fn max() -> Self; fn mix(self, rhs: Self, value: Self) -> Self; fn zero() -> 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 { ... }
Associated Types
type NearestFloat: Float + Channel
[src]
Required methods
fn from<T: Channel>(chan: T) -> Self
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> Self
[src]
fn max() -> Self
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
Provided methods
fn to_channel<T: Channel>(self) -> T
[src]
fn clamp(self, lo: Self, hi: Self) -> Self
[src]
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
[src]
Implementations on Foreign Types
impl Channel for u8
[src]
impl Channel for u8
[src]type NearestFloat = f32
fn from<T: Channel>(chan: T) -> u8
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> u8
[src]
fn max() -> u8
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
impl Channel for u16
[src]
impl Channel for u16
[src]type NearestFloat = f32
fn from<T: Channel>(chan: T) -> u16
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> u16
[src]
fn max() -> u16
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
impl Channel for u32
[src]
impl Channel for u32
[src]type NearestFloat = f32
fn from<T: Channel>(chan: T) -> u32
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> u32
[src]
fn max() -> u32
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
impl Channel for f16
[src]
impl Channel for f16
[src]type NearestFloat = f32
fn from<T: Channel>(chan: T) -> f16
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> f16
[src]
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
[src]
fn max() -> f16
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
impl Channel for f32
[src]
impl Channel for f32
[src]type NearestFloat = f32
fn from<T: Channel>(chan: T) -> f32
[src]
fn to_channel_u8(self) -> u8
[src]
fn to_channel_u16(self) -> u16
[src]
fn to_channel_u32(self) -> u32
[src]
fn to_channel_f16(self) -> f16
[src]
fn to_channel_f32(self) -> f32
[src]
fn to_channel_f64(self) -> f64
[src]
fn to_nearest_precision_float(self) -> Self::NearestFloat
[src]
fn invert_channel(self) -> f32
[src]
fn normalized_mul(self, rhs: Self) -> Self
[src]
fn normalized_div(self, rhs: Self) -> Self
[src]
fn max() -> f32
[src]
fn mix(self, rhs: Self, value: Self) -> Self
[src]
fn zero() -> Self
[src]
impl Channel for f64
[src]
impl Channel for f64
[src]