[][src]Struct pix::Mask

#[repr(C)]
pub struct Mask<A: Alpha> { /* fields omitted */ }

Translucent alpha mask pixel Format.

Methods

impl<A: Alpha> Mask<A>[src]

pub fn new<B>(alpha: B) -> Self where
    A: From<B>, 
[src]

Create a new Mask value.

pub fn alpha(self) -> A[src]

Get the alpha value.

Trait Implementations

impl<A: Alpha> AlphaMode for Mask<A>[src]

fn encode<H: Channel, B: Alpha<Chan = H>>(h: H, b: B) -> H[src]

Encode one Channel using the gamma mode.

fn decode<H: Channel, B: Alpha<Chan = H>>(h: H, b: B) -> H[src]

Decode one Channel using the gamma mode.

impl<A: Clone + Alpha> Clone for Mask<A>[src]

impl<A: Copy + Alpha> Copy for Mask<A>[src]

impl<A: Debug + Alpha> Debug for Mask<A>[src]

impl<A: Default + Alpha> Default for Mask<A>[src]

impl<C, A> Format for Mask<A> where
    C: Channel,
    A: Alpha<Chan = C> + From<C>, 
[src]

type Chan = C

Channel type

fn rgba(self) -> [Self::Chan; 4][src]

Get red, green, blue and alpha Channels

fn with_rgba(rgba: [Self::Chan; 4]) -> Self[src]

Make a pixel with given RGBA Channels

fn difference(self, rhs: Self) -> Self[src]

Get channel-wise difference

fn within_threshold(self, rhs: Self) -> bool[src]

Check if all Channels are within threshold

impl<C, A, G: GammaMode> From<Mask<A>> for Rgb<C, A, SeparatedAlpha, G> where
    C: Channel,
    A: Alpha<Chan = C>, 
[src]

fn from(c: Mask<A>) -> Self[src]

Get an Rgb from a Mask

impl<C, A, G: GammaMode> From<Mask<A>> for Rgb<C, A, AssociatedAlpha, G> where
    C: Channel,
    A: Alpha<Chan = C>, 
[src]

fn from(c: Mask<A>) -> Self[src]

Get an Rgb from a Mask

impl<C, A, G: GammaMode> From<Mask<A>> for Gray<C, A, SeparatedAlpha, G> where
    C: Channel,
    A: Alpha<Chan = C>, 
[src]

fn from(c: Mask<A>) -> Self[src]

Get a Gray from a Mask

impl<C, A, G: GammaMode> From<Mask<A>> for Gray<C, A, AssociatedAlpha, G> where
    C: Channel,
    A: Alpha<Chan = C>, 
[src]

fn from(c: Mask<A>) -> Self[src]

Get a Gray from a Mask

impl<A: Alpha> GammaMode for Mask<A>[src]

fn encode<H: Channel>(h: H) -> H[src]

Encode one Channel using the gamma mode.

fn decode<H: Channel>(h: H) -> H[src]

Decode one Channel using the gamma mode.

impl<A: Alpha> Iterator for Mask<A>[src]

type Item = Self

The type of the elements being iterated over.

impl<A: Alpha> Mul<Mask<A>> for Mask<A>[src]

type Output = Self

The resulting type after applying the * operator.

impl<A: PartialEq + Alpha> PartialEq<Mask<A>> for Mask<A>[src]

impl<A: Alpha> StructuralPartialEq for Mask<A>[src]

Auto Trait Implementations

impl<A> RefUnwindSafe for Mask<A> where
    A: RefUnwindSafe

impl<A> Send for Mask<A> where
    A: Send

impl<A> Sync for Mask<A> where
    A: Sync

impl<A> Unpin for Mask<A> where
    A: Unpin

impl<A> UnwindSafe for Mask<A> where
    A: UnwindSafe

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.