Trait rasterize::ImageMut

source ·
pub trait ImageMut: Image {
    // Required method
    fn data_mut(&mut self) -> &mut [Self::Pixel];

    // Provided methods
    fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel> { ... }
    fn view_mut(
        &mut self,
        row_min: usize,
        row_max: usize,
        col_min: usize,
        col_max: usize
    ) -> ImageMutRef<'_, Self::Pixel> { ... }
    fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel> { ... }
    fn clear(&mut self)
       where Self::Pixel: Default { ... }
    fn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel>  { ... }
}
Expand description

Mutable image interface

Required Methods§

source

fn data_mut(&mut self) -> &mut [Self::Pixel]

Get a mutable slice of image data

Provided Methods§

source

fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel>

Get a mutable reference to the specified pixel

source

fn view_mut( &mut self, row_min: usize, row_max: usize, col_min: usize, col_max: usize ) -> ImageMutRef<'_, Self::Pixel>

Create mutable sub-image bounded by constraints, _max values are not inclusive.

source

fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>

Create concrete type reference to the image

source

fn clear(&mut self)
where Self::Pixel: Default,

Fill image with the default pixel value

source

fn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel>

Create iterator over mutable references to all the pixel of the image

Implementations on Foreign Types§

source§

impl<'a, I> ImageMut for &'a mut I
where I: ImageMut + ?Sized,

source§

fn data_mut(&mut self) -> &mut [Self::Pixel]

Implementors§

source§

impl<'a, P> ImageMut for ImageMutRef<'a, P>

source§

impl<C> ImageMut for ImageOwned<C>

source§

impl<C> ImageMut for Layer<C>