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