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§
Required Methods§
sourcefn transform_pixel(&self, pixel: Pix) -> Self::Output
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,
impl<Pix, O> PixelTransform<Pix> for Box<dyn PixelTransform<Pix, Output = O>>where
Pix: Pixel,
O: Pixel + 'static,
Implementations on Foreign Types§
source§impl<F, G, Pix: Pixel> PixelTransform<Pix> for (F, G)
impl<F, G, Pix: Pixel> PixelTransform<Pix> for (F, G)
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
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,
impl<Pix, O> PixelTransform<Pix> for Box<dyn PixelTransform<Pix, Output = O>>where
Pix: Pixel,
O: Pixel + 'static,
source§impl<Pix: Pixel + 'static> PixelTransform<Pix> for ()
impl<Pix: Pixel + 'static> PixelTransform<Pix> for ()
No-op transform.