[−][src]Trait pixops::Blend
Pixel format which can be blended.
Required methods
fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
Self: From<B>,
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
.
Provided methods
fn over_slice<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
Self: From<B>,
Self: From<B>,
Blend pixels with over
operation.
dst
Destination pixels.src
Source pixels.clr
Mask color.
Implementations on Foreign Types
impl<C, A> Blend for Gray<C, A> where
C: Channel + Lerp,
A: Alpha<Chan = C>,
A: From<C>,
[src]
C: Channel + Lerp,
A: Alpha<Chan = C>,
A: From<C>,
fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], _clr: Self) where
Self: From<B>,
[src]
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
[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]
C: Channel + Lerp,
A: Alpha<Chan = C>,
A: From<C>,
fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
Self: From<B>,
[src]
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
[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]
C: Channel + Lerp,
A: Alpha<Chan = C>,
A: From<C>,
fn over_fallback<B: Blend>(dst: &mut [Self], src: &[B], clr: Self) where
Self: From<B>,
[src]
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
[src]
Blend pixel on top of another, using over
.