pub struct ImageMutSlice<'a, P>where
P: 'a,{ /* private fields */ }
Expand description
A mutable sub-view of some image data.
Implementations§
Source§impl<'a, P> ImageMutSlice<'a, P>where
P: 'a,
impl<'a, P> ImageMutSlice<'a, P>where
P: 'a,
Sourcepub unsafe fn from_raw_parts(
width: usize,
height: usize,
pitch: isize,
ptr: *mut P,
) -> ImageMutSlice<'a, P>
pub unsafe fn from_raw_parts( width: usize, height: usize, pitch: isize, ptr: *mut P, ) -> ImageMutSlice<'a, P>
Makes a mutable image slice from the base parts.
Absolutely no checks are performed, you must not lie to this method.
Trait Implementations§
Source§impl<'a, P> Clone for ImageMutSlice<'a, P>where
P: Clone + 'a,
impl<'a, P> Clone for ImageMutSlice<'a, P>where
P: Clone + 'a,
Source§fn clone(&self) -> ImageMutSlice<'a, P>
fn clone(&self) -> ImageMutSlice<'a, P>
Returns a duplicate 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<'a, P> Debug for ImageMutSlice<'a, P>where
P: Debug + 'a,
impl<'a, P> Debug for ImageMutSlice<'a, P>where
P: Debug + 'a,
Source§impl<'a, P> Hash for ImageMutSlice<'a, P>where
P: Hash + 'a,
impl<'a, P> Hash for ImageMutSlice<'a, P>where
P: Hash + 'a,
Source§impl<'a, P> IntoIterator for ImageMutSlice<'a, P>where
P: 'a,
impl<'a, P> IntoIterator for ImageMutSlice<'a, P>where
P: 'a,
Source§impl<'a, P> Ord for ImageMutSlice<'a, P>where
P: Ord + 'a,
impl<'a, P> Ord for ImageMutSlice<'a, P>where
P: Ord + 'a,
Source§fn cmp(&self, other: &ImageMutSlice<'a, P>) -> Ordering
fn cmp(&self, other: &ImageMutSlice<'a, P>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, P> PartialEq for ImageMutSlice<'a, P>where
P: PartialEq + 'a,
impl<'a, P> PartialEq for ImageMutSlice<'a, P>where
P: PartialEq + 'a,
Source§impl<'a, P> PartialOrd for ImageMutSlice<'a, P>where
P: PartialOrd + 'a,
impl<'a, P> PartialOrd for ImageMutSlice<'a, P>where
P: PartialOrd + 'a,
Source§impl<'a, P> ReadableImage<P> for ImageMutSlice<'a, P>where
P: 'a,
impl<'a, P> ReadableImage<P> for ImageMutSlice<'a, P>where
P: 'a,
Source§fn get(&self, loc: (usize, usize)) -> Option<&P>
fn get(&self, loc: (usize, usize)) -> Option<&P>
Performs an optional indexing by reference, gives
None
for out of bounds.Source§fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<'_, P>
fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<'_, P>
Grabs out a sub-slice of the data. Read more
Source§fn iter(&self) -> ImageRefIter<'_, P> ⓘ
fn iter(&self) -> ImageRefIter<'_, P> ⓘ
Lets you iterate any image by reference.
Source§fn to_vecimage(&self) -> VecImage<P>
fn to_vecimage(&self) -> VecImage<P>
This is like
to_owned
, you get your own version of the data. Read moreSource§impl<'a, P> WritableImage<P> for ImageMutSlice<'a, P>where
P: 'a,
impl<'a, P> WritableImage<P> for ImageMutSlice<'a, P>where
P: 'a,
Source§fn as_mut_ptr(&mut self) -> *mut P
fn as_mut_ptr(&mut self) -> *mut P
Raw mut pointer to the data.
Source§fn get_mut(&mut self, loc: (usize, usize)) -> Option<&mut P>
fn get_mut(&mut self, loc: (usize, usize)) -> Option<&mut P>
Performs an optional indexing by mut reference, gives
None
for out of bounds.Source§fn slice_mut(&mut self, r: Range<(usize, usize)>) -> ImageMutSlice<'_, P>
fn slice_mut(&mut self, r: Range<(usize, usize)>) -> ImageMutSlice<'_, P>
Grabs out a mutable sub-slice of the data. Read more
Source§fn iter_mut(&mut self) -> ImageMutRefIter<'_, P> ⓘ
fn iter_mut(&mut self) -> ImageMutRefIter<'_, P> ⓘ
Lets you mutably iterate over any writable form of image.
Source§fn set_all(&mut self, pixel: P)where
P: Clone,
fn set_all(&mut self, pixel: P)where
P: Clone,
Assigns all locations to be the given pixel value.
Source§fn direct_copy<S>(&mut self, src: &S, offset: (isize, isize))where
S: ReadableImage<P>,
P: Copy,
fn direct_copy<S>(&mut self, src: &S, offset: (isize, isize))where
S: ReadableImage<P>,
P: Copy,
Directly copies the data from the source image into this image. Read more
Source§fn flip_vertical(&mut self)
fn flip_vertical(&mut self)
Flips the image vertically. Read more
Source§fn flip_horizontal(&mut self)
fn flip_horizontal(&mut self)
Flips the image horizontally. Read more
Source§fn inplace_counterclockwise90_square(&mut self) -> Option<()>
fn inplace_counterclockwise90_square(&mut self) -> Option<()>
Performs a 90 degrees counter-clockwise rotation, in place. Read more
Source§impl<'a> WritableImageU16Ext for ImageMutSlice<'a, u16>
impl<'a> WritableImageU16Ext for ImageMutSlice<'a, u16>
Source§fn blit_rgba16<RI>(&mut self, src: &RI, offset: (isize, isize))where
RI: ReadableImage<u16>,
fn blit_rgba16<RI>(&mut self, src: &RI, offset: (isize, isize))where
RI: ReadableImage<u16>,
This copies the data from the source into the destination any time the
source’s alpha bit is set. Read more
Source§impl<'a> WritableImageU32Ext for ImageMutSlice<'a, u32>
impl<'a> WritableImageU32Ext for ImageMutSlice<'a, u32>
Source§fn blit_blend_rectilinear<RI>(&mut self, src: &RI, offset: (isize, isize))where
RI: ReadableImage<u32>,
fn blit_blend_rectilinear<RI>(&mut self, src: &RI, offset: (isize, isize))where
RI: ReadableImage<u32>,
Performs a rectilinear blending blit at an integral pixel offset. Read more
impl<'a, P> Eq for ImageMutSlice<'a, P>where
P: Eq + 'a,
impl<'a, P> StructuralPartialEq for ImageMutSlice<'a, P>where
P: 'a,
Auto Trait Implementations§
impl<'a, P> Freeze for ImageMutSlice<'a, P>
impl<'a, P> RefUnwindSafe for ImageMutSlice<'a, P>where
P: RefUnwindSafe,
impl<'a, P> !Send for ImageMutSlice<'a, P>
impl<'a, P> !Sync for ImageMutSlice<'a, P>
impl<'a, P> Unpin for ImageMutSlice<'a, P>
impl<'a, P> !UnwindSafe for ImageMutSlice<'a, P>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.