Struct rasterize::ImageOwned
source · pub struct ImageOwned<P> { /* private fields */ }
Expand description
Create an image that owns the data
Implementations§
source§impl<P> ImageOwned<P>
impl<P> ImageOwned<P>
sourcepub fn new(shape: Shape, data: Vec<P>) -> Self
pub fn new(shape: Shape, data: Vec<P>) -> Self
Construct owned image from the data
and the shape
sourcepub fn new_default(size: Size) -> Selfwhere
P: Default,
pub fn new_default(size: Size) -> Selfwhere
P: Default,
Construct owned image filled with default color with provided size
Trait Implementations§
source§impl<P: Clone> Clone for ImageOwned<P>
impl<P: Clone> Clone for ImageOwned<P>
source§fn clone(&self) -> ImageOwned<P>
fn clone(&self) -> ImageOwned<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P> Debug for ImageOwned<P>
impl<P> Debug for ImageOwned<P>
source§impl<P> Image for ImageOwned<P>
impl<P> Image for ImageOwned<P>
source§fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
Get pixel at the specified row and column
source§fn view(
&self,
row_min: usize,
row_max: usize,
col_min: usize,
col_max: usize
) -> ImageRef<'_, Self::Pixel>
fn view( &self, row_min: usize, row_max: usize, col_min: usize, col_max: usize ) -> ImageRef<'_, Self::Pixel>
Create sub-image bounded by constraints,
_max
values are not inclusive.source§impl<C> ImageMut for ImageOwned<C>
impl<C> ImageMut for ImageOwned<C>
source§fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel>
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>
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>
fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
Create concrete type reference to the image
Auto Trait Implementations§
impl<P> Freeze for ImageOwned<P>
impl<P> RefUnwindSafe for ImageOwned<P>where
P: RefUnwindSafe,
impl<P> Send for ImageOwned<P>where
P: Send,
impl<P> Sync for ImageOwned<P>where
P: Sync,
impl<P> Unpin for ImageOwned<P>where
P: Unpin,
impl<P> UnwindSafe for ImageOwned<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more