pub trait Blend: Format {
// Required methods
fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
where B: Format<Chan = H>,
Self::Chan: From<H>,
H: Channel + From<Self::Chan>;
fn over<B, H>(dst: Self, src: B) -> Self
where B: Format<Chan = H>,
Self::Chan: From<H>,
H: Channel + From<Self::Chan>;
// Provided method
fn over_slice<B, H>(dst: &mut [Self], src: &[B], clr: Self)
where B: Format<Chan = H>,
Self::Chan: From<H>,
H: Channel + From<Self::Chan> { ... }
}Expand description
Pixel format which can be blended.
Required Methods§
Sourcefn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
Blend pixels with over operation (slow fallback).
dstDestination pixels.srcSource pixels.clrMask color.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<C, A> Blend for Mask<A>
impl<C, A> Blend for Mask<A>
Source§fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
Blend pixels with over operation (slow fallback).
dstDestination pixels.srcSource pixels.clrMask color.
Source§impl<C, A, M, G> Blend for Gray<C, A, M, G>
impl<C, A, M, G> Blend for Gray<C, A, M, G>
Source§fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
Blend pixels with over operation (slow fallback).
dstDestination pixels.srcSource pixels.clrMask color.
Source§impl<C, A, M, G> Blend for Rgb<C, A, M, G>
impl<C, A, M, G> Blend for Rgb<C, A, M, G>
Source§fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
fn over_fallback<B, H>(dst: &mut [Self], src: &[B], clr: Self)
Blend pixels with over operation (slow fallback).
dstDestination pixels.srcSource pixels.clrMask color.