[][src]Trait pix::Alpha

pub trait Alpha: Copy + Default + PartialEq {
    type Chan: Channel;
    fn value(&self) -> Self::Chan;
}

Channel for defining the opacity of pixels.

It is the inverse of translucency.

Associated Types

type Chan: Channel

Channel type

Loading content...

Required methods

fn value(&self) -> Self::Chan

Get the alpha Channel value.

Channel::MIN is fully transparent, and Channel::MAX is fully opaque.

Loading content...

Implementors

impl<C: Channel> Alpha for Opaque<C>[src]

type Chan = C

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

Get the alpha Channel value.

Always returns Channel::MAX (fully opaque).

impl<C: Channel> Alpha for Translucent<C>[src]

type Chan = C

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

Get the alpha Channel value.

Channel::MIN is fully transparent, and Channel::MAX is fully opaque.

Loading content...