[][src]Trait pixops::Blend

pub trait Blend: Format {
    fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], clr: Self)
    where
        Self: From<B>
;
fn over(dst: Self, src: Self) -> Self; fn over_slice<B: Blend>(dst: &mut [Self], src: &[B], clr: Self)
    where
        Self: From<B>
, { ... } }

Pixel format which can be blended.

Required methods

fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
    Self: From<B>, 

Blend pixels with over operation (slow fallback).

  • dst Destination pixels.
  • src Source pixels.
  • clr Mask color.

fn over(dst: Self, src: Self) -> Self

Blend pixel on top of another, using over.

Loading content...

Provided methods

fn over_slice<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
    Self: From<B>, 

Blend pixels with over operation.

  • dst Destination pixels.
  • src Source pixels.
  • clr Mask color.
Loading content...

Implementations on Foreign Types

impl<C, A> Blend for Gray<C, A> where
    C: Channel + Lerp,
    A: Alpha<Chan = C>,
    A: From<C>, 
[src]

fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], _clr: Self) where
    Self: From<B>, 
[src]

Blend pixels with over operation (slow fallback).

  • dst Destination pixels.
  • src Source pixels.
  • clr Mask color.

fn over(dst: Self, src: Self) -> Self[src]

Blend pixel on top of another, using over.

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

fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], _clr: Self) where
    Self: From<B>, 
[src]

Blend pixels with over operation (slow fallback).

  • dst Destination pixels.
  • src Source pixels.
  • clr Mask color.

fn over(dst: Self, src: Self) -> Self[src]

Blend pixel on top of another, using over.

impl<C, A> Blend for Rgb<C, A> where
    C: Channel + Lerp,
    A: Alpha<Chan = C>,
    A: From<C>, 
[src]

fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], _clr: Self) where
    Self: From<B>, 
[src]

Blend pixels with over operation (slow fallback).

  • dst Destination pixels.
  • src Source pixels.
  • clr Mask color.

fn over(dst: Self, src: Self) -> Self[src]

Blend pixel on top of another, using over.

Loading content...

Implementors

Loading content...