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]

Loading content...

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]

Loading content...

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]

Loading content...

Implementations on Foreign Types

impl Channel for u8[src]

type NearestFloat = f32

impl Channel for u16[src]

type NearestFloat = f32

impl Channel for u32[src]

type NearestFloat = f32

impl Channel for f16[src]

type NearestFloat = f32

impl Channel for f32[src]

type NearestFloat = f32

impl Channel for f64[src]

type NearestFloat = f64

Loading content...

Implementors

Loading content...