[−][src]Type Definition imgref::ImgRefMut
type ImgRefMut<'a, Pixel> = Img<&'a mut [Pixel]>;
Same as ImgRef
, but mutable
Pass this structure by value (i.e. ImgRef
, not &ImgRef
).
Methods
impl<'a, T> ImgRefMut<'a, T>
[src]
#[must_use]pub fn sub_image(
&'a mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<'a, T>
[src]
&'a mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<'a, T>
Turn this into immutable reference, and slice a subregion of it
#[must_use]pub fn sub_image_mut(
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRefMut<T>
[src]
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRefMut<T>
Trim this image without copying. Note that mutable borrows are exclusive, so it's not possible to have more than one mutable subimage at a time.
#[must_use]pub fn as_ref(&self) -> ImgRef<T>
[src]
Make mutable reference immutable
impl<'a, T: Copy> ImgRefMut<'a, T>
[src]
#[must_use]pub fn pixels(&self) -> PixelsIter<T>
[src]
Panics
if width is 0
#[must_use]pub fn pixels_mut(&mut self) -> PixelsIterMut<T>
[src]
Panics
if width is 0