[][src]Trait pix::AlphaMode

pub trait AlphaMode: Copy + Clone + Debug + PartialEq + Default {
    const ID: AlphaModeID;

    fn encode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C;
fn decode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C; }

Trait for handling associated versus separated alpha

Associated Constants

Loading content...

Required methods

fn encode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C

Encode one Channel using the alpha mode.

fn decode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C

Decode one Channel using the alpha mode.

Loading content...

Implementors

impl AlphaMode for AssociatedAlpha[src]

fn encode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C[src]

Encode one Channel using the alpha mode.

fn decode<C: Channel, A: Alpha<Chan = C>>(c: C, a: A) -> C[src]

Decode one Channel using the alpha mode.

impl AlphaMode for SeparatedAlpha[src]

fn encode<C: Channel, A: Alpha<Chan = C>>(c: C, _a: A) -> C[src]

Encode one Channel using the alpha mode.

fn decode<C: Channel, A: Alpha<Chan = C>>(c: C, _a: A) -> C[src]

Decode one Channel using the alpha mode.

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<C: Channel, A: Alpha, M: AlphaMode, G: GammaMode> AlphaMode for Gray<C, A, M, G>[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<C: Channel, A: Alpha, M: AlphaMode, G: GammaMode> AlphaMode for Rgb<C, A, M, G>[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.

Loading content...