pub trait RasterMut<Pixel>: Raster<Pixel> {
    fn put(into: ImageMut<'_, &mut Self>, at: Coord, val: Pixel);

    fn shade(
        image: ImageMut<'_, &mut Self>,
        f: impl FnMut(u32, u32, &mut Pixel)
    ) { ... } }
Expand description

A raster layout where one can change pixel values independently.

In other words, requires that texels are actually one-by-one blocks of pixels.

Note that it does not prescribe any particular order of arrangement of these texels. Indeed, they could be in column major format, in row major format, ordered according to some space filling curve, etc. but subsampled images are not easily possible as pixels can not be written to independently.

Required Methods

Provided Methods

Evaluate a function on each texel of the raster image.

Implementors