[][src]Struct pix::Ch32

pub struct Ch32(_);

32-bit color Channel

The Channel is represented by an f32, but values are guaranteed to be between 0 and 1, inclusive.

let c: Ch32 = 0.0.into();
assert_eq!(c, Ch32::MIN);
let c: Ch8 = c.into();
assert_eq!(c, Ch8::MIN);
let c: Ch32 = 1.0.into();
assert_eq!(c, Ch32::MAX);
let c: Ch16 = c.into();
assert_eq!(c, Ch16::MAX);

Methods

impl Ch32[src]

pub fn new(value: f32) -> Self[src]

Create a new 32-bit Channel value.

Returns MIN if value is less than 0.0, or NaN. Returns MAX if value is greater than 1.0.

Trait Implementations

impl<R> Add<R> for Ch32 where
    Self: From<R>, 
[src]

type Output = Self

The resulting type after applying the + operator.

impl Channel for Ch32[src]

const MIN: Ch32[src]

Minimum intensity (zero)

const MAX: Ch32[src]

Maximum intensity (one)

fn powf(self, g: f32) -> Self[src]

Raise to given power

impl Clone for Ch32[src]

impl Copy for Ch32[src]

impl Debug for Ch32[src]

impl Default for Ch32[src]

impl Div<Ch32> for Ch32[src]

type Output = Self

The resulting type after applying the / operator.

impl Eq for Ch32[src]

impl From<Ch16> for Ch32[src]

impl From<Ch32> for f32[src]

impl From<Ch32> for Ch8[src]

impl From<Ch32> for Ch16[src]

impl From<Ch8> for Ch32[src]

impl<C: Channel> From<Opaque<C>> for Ch32[src]

impl From<f32> for Ch32[src]

impl Mul<Ch32> for Ch32[src]

type Output = Self

The resulting type after applying the * operator.

impl Ord for Ch32[src]

impl PartialEq<Ch32> for Ch32[src]

impl PartialOrd<Ch32> for Ch32[src]

impl StructuralPartialEq for Ch32[src]

impl<R> Sub<R> for Ch32 where
    Self: From<R>, 
[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Ch32

impl Send for Ch32

impl Sync for Ch32

impl Unpin for Ch32

impl UnwindSafe for Ch32

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.