[−][src]Trait pix::chan::Channel
Component of a color model, such as red, green, etc.
Existing Channel
s are Ch8, Ch16 and Ch32.
This trait is sealed, and cannot be implemented outside of this crate.
Associated Constants
const MIN: Self
Minimum intensity (zero)
const MID: Self
Mid intensity
const MAX: Self
Maximum intensity (one)
Required methods
fn to_f32(self) -> f32
Convert to f32
fn wrapping_add(self, rhs: Self) -> Self
Wrapping addition
fn wrapping_sub(self, rhs: Self) -> Self
Wrapping subtraction
fn encode_srgb(self) -> Self
Encode an sRGB gamma value from linear intensity
fn decode_srgb(self) -> Self
Decode an sRGB gamma value into linear intensity
fn lerp(self, rhs: Self, t: Self) -> Self
Linear interpolation
Implementors
impl Channel for Ch16
[src]
const MIN: Ch16
[src]
const MID: Ch16
[src]
const MAX: Ch16
[src]
fn to_f32(self) -> f32
[src]
Convert to f32
fn wrapping_add(self, rhs: Self) -> Self
[src]
Wrapping addition
fn wrapping_sub(self, rhs: Self) -> Self
[src]
Wrapping subtraction
fn encode_srgb(self) -> Self
[src]
Encode an sRGB gamma value from linear intensity
fn decode_srgb(self) -> Self
[src]
Decode an sRGB gamma value into linear intensity
fn lerp(self, rhs: Self, t: Self) -> Self
[src]
Linear interpolation
impl Channel for Ch32
[src]
const MIN: Ch32
[src]
const MID: Ch32
[src]
const MAX: Ch32
[src]
fn to_f32(self) -> f32
[src]
Convert to f32
fn wrapping_add(self, rhs: Self) -> Self
[src]
Wrapping addition
fn wrapping_sub(self, rhs: Self) -> Self
[src]
Wrapping subtraction
fn encode_srgb(self) -> Self
[src]
Encode an sRGB gamma value from linear intensity
fn decode_srgb(self) -> Self
[src]
Decode an sRGB gamma value into linear intensity
fn lerp(self, rhs: Self, t: Self) -> Self
[src]
Linear interpolation
impl Channel for Ch8
[src]
const MIN: Ch8
[src]
const MID: Ch8
[src]
const MAX: Ch8
[src]
fn to_f32(self) -> f32
[src]
Convert to f32
fn wrapping_add(self, rhs: Self) -> Self
[src]
Wrapping addition
fn wrapping_sub(self, rhs: Self) -> Self
[src]
Wrapping subtraction
fn encode_srgb(self) -> Self
[src]
Encode an sRGB gamma value from linear intensity
fn decode_srgb(self) -> Self
[src]
Decode an sRGB gamma value into linear intensity
fn lerp(self, rhs: Self, t: Self) -> Self
[src]
Linear interpolation