Trait julia_set::transform::PixelTransform

source ·
pub trait PixelTransform<Pix: Pixel> {
    type Output: Pixel + 'static;

    // Required method
    fn transform_pixel(&self, pixel: Pix) -> Self::Output;
}
Expand description

Pixel-wise transform.

The function defined by the transform is applied separately to each pixel of the source image. The transform may change the type of pixels (e.g., transform from grayscale to a color image), or may leave it intact.

Required Associated Types§

source

type Output: Pixel + 'static

Pixel type for the output image.

Required Methods§

source

fn transform_pixel(&self, pixel: Pix) -> Self::Output

Performs transform on a single pixel.

Trait Implementations§

source§

impl<Pix, O> PixelTransform<Pix> for Box<dyn PixelTransform<Pix, Output = O>>
where Pix: Pixel, O: Pixel + 'static,

§

type Output = O

Pixel type for the output image.
source§

fn transform_pixel(&self, pixel: Pix) -> Self::Output

Performs transform on a single pixel.

Implementations on Foreign Types§

source§

impl<F, G, Pix: Pixel> PixelTransform<Pix> for (F, G)
where F: PixelTransform<Pix>, G: PixelTransform<F::Output>,

Composition of two transforms. The transforms are applied in the same order they are listed in a tuple.

§

type Output = <G as PixelTransform<<F as PixelTransform<Pix>>::Output>>::Output

source§

fn transform_pixel(&self, pixel: Pix) -> Self::Output

source§

impl<Pix, O> PixelTransform<Pix> for Box<dyn PixelTransform<Pix, Output = O>>
where Pix: Pixel, O: Pixel + 'static,

§

type Output = O

source§

fn transform_pixel(&self, pixel: Pix) -> Self::Output

source§

impl<Pix: Pixel + 'static> PixelTransform<Pix> for ()

No-op transform.

§

type Output = Pix

source§

fn transform_pixel(&self, pixel: Pix) -> Self::Output

Implementors§

source§

impl PixelTransform<Luma<u8>> for Negative

§

type Output = Luma<u8>

source§

impl PixelTransform<Luma<u8>> for Smoothstep

§

type Output = Luma<u8>

source§

impl<Pix: Pixel + 'static> PixelTransform<Luma<u8>> for Palette<Pix>

§

type Output = Pix