[][src]Struct pix::Gray

#[repr(C)]
pub struct Gray<C: Channel> { /* fields omitted */ }

Linear grayscale pixel format.

There is a single gray channel with linear intensity.

Methods

impl<C: Channel> Gray<C>[src]

pub fn new<V>(value: V) -> Self where
    C: From<V>, 
[src]

Build a gray value.

pub fn value(self) -> C[src]

Get the component value.

Trait Implementations

impl<C: Channel> PixFmt for Gray<C>[src]

fn mask_over_fallback(dst: &mut [Self], mask: &[u8], src: Self)[src]

Blend pixels with an alpha mask (slow fallback).

  • dst Destination pixels.
  • mask Alpha mask for compositing.
  • src Source color.

fn mask_over(dst: &mut [Self], mask: &[u8], src: Self)[src]

Blend pixels with an alpha mask. Read more

fn as_u8_slice(pix: &[Self]) -> &[u8][src]

Convert a pixel slice into a u8 slice. Read more

fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8][src]

Convert a pixel slice into a mutable u8 slice. Read more

fn as_slice(pix: &[u8]) -> &[Self][src]

Convert a u8 slice into a pixel slice. Read more

fn as_slice_mut(pix: &mut [u8]) -> &mut [Self][src]

Convert a u8 slice into a mutable pixel slice. Read more

impl<C: Channel, H: Channel> From<Rgb<H>> for Gray<C> where
    C: From<H>, 
[src]

fn from(rgb: Rgb<H>) -> Self[src]

Get a gray from an rgb

impl<C: Channel, H: Channel> From<Gray<H>> for Rgb<C> where
    C: From<H>, 
[src]

fn from(c: Gray<H>) -> Self[src]

Get an Rgb from a Gray

impl<C: Copy + Channel> Copy for Gray<C>[src]

impl<C: Clone + Channel> Clone for Gray<C>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: PartialEq + Channel> PartialEq<Gray<C>> for Gray<C>[src]

impl<C: Default + Channel> Default for Gray<C>[src]

impl<C: Debug + Channel> Debug for Gray<C>[src]

Auto Trait Implementations

impl<C> Send for Gray<C> where
    C: Send

impl<C> Sync for Gray<C> where
    C: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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