Struct retro_pixel::ImageMutSlice [−][src]
pub struct ImageMutSlice<'a, P: 'a> { /* fields omitted */ }
A mutable sub-view of some image data.
Methods
impl<'a, P: 'a> ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> ImageMutSlice<'a, P>
pub unsafe fn from_raw_parts(
width: usize,
height: usize,
pitch: isize,
ptr: *mut P
) -> Self
[src]
pub unsafe fn from_raw_parts(
width: usize,
height: usize,
pitch: isize,
ptr: *mut P
) -> Self
Makes a mutable image slice from the base parts.
Absolutely no checks are performed, you must not lie to this method.
Trait Implementations
impl<'a, P: Debug + 'a> Debug for ImageMutSlice<'a, P>
[src]
impl<'a, P: Debug + 'a> Debug for ImageMutSlice<'a, P>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, P: Clone + 'a> Clone for ImageMutSlice<'a, P>
[src]
impl<'a, P: Clone + 'a> Clone for ImageMutSlice<'a, P>
fn clone(&self) -> ImageMutSlice<'a, P>
[src]
fn clone(&self) -> ImageMutSlice<'a, P>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, P: PartialEq + 'a> PartialEq for ImageMutSlice<'a, P>
[src]
impl<'a, P: PartialEq + 'a> PartialEq for ImageMutSlice<'a, P>
fn eq(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn eq(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn ne(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests for !=
.
impl<'a, P: Eq + 'a> Eq for ImageMutSlice<'a, P>
[src]
impl<'a, P: Eq + 'a> Eq for ImageMutSlice<'a, P>
impl<'a, P: PartialOrd + 'a> PartialOrd for ImageMutSlice<'a, P>
[src]
impl<'a, P: PartialOrd + 'a> PartialOrd for ImageMutSlice<'a, P>
fn partial_cmp(&self, other: &ImageMutSlice<'a, P>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ImageMutSlice<'a, P>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn lt(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn le(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn gt(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ImageMutSlice<'a, P>) -> bool
[src]
fn ge(&self, other: &ImageMutSlice<'a, P>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a, P: Ord + 'a> Ord for ImageMutSlice<'a, P>
[src]
impl<'a, P: Ord + 'a> Ord for ImageMutSlice<'a, P>
fn cmp(&self, other: &ImageMutSlice<'a, P>) -> Ordering
[src]
fn cmp(&self, other: &ImageMutSlice<'a, P>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<'a, P: Hash + 'a> Hash for ImageMutSlice<'a, P>
[src]
impl<'a, P: Hash + 'a> Hash for ImageMutSlice<'a, P>
fn hash<__HP: Hasher>(&self, state: &mut __HP)
[src]
fn hash<__HP: Hasher>(&self, state: &mut __HP)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a, P: 'a> Index<(usize, usize)> for ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> Index<(usize, usize)> for ImageMutSlice<'a, P>
type Output = P
The returned type after indexing.
fn index(&self, (x, y): (usize, usize)) -> &Self::Output
[src]
fn index(&self, (x, y): (usize, usize)) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl<'a, P: 'a> ReadableImage<P> for ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> ReadableImage<P> for ImageMutSlice<'a, P>
fn width(&self) -> usize
[src]
fn width(&self) -> usize
Can't exceed isize::MAX
fn height(&self) -> usize
[src]
fn height(&self) -> usize
Can't exceed isize::MAX
fn pitch(&self) -> isize
[src]
fn pitch(&self) -> isize
Offset from the start of one row to the start of the next row.
fn as_ptr(&self) -> *const P
[src]
fn as_ptr(&self) -> *const P
Raw const pointer to the data.
fn get(&self, loc: (usize, usize)) -> Option<&P>
[src]
fn get(&self, loc: (usize, usize)) -> Option<&P>
Performs an optional indexing by reference, gives None
for out of bounds.
fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<P>
[src]
fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<P>
Grabs out a sub-slice of the data. Read more
ⓘImportant traits for ImageRefIter<'a, P>fn iter(&self) -> ImageRefIter<P>
[src]
fn iter(&self) -> ImageRefIter<P>
Lets you iterate any image by reference.
fn to_vecimage(&self) -> VecImage<P> where
Self: Sized,
P: Default + Clone,
[src]
fn to_vecimage(&self) -> VecImage<P> where
Self: Sized,
P: Default + Clone,
This is like to_owned
, you get your own version of the data. Read more
fn upscale(&self, scale: usize) -> VecImage<P> where
P: Copy + Default,
[src]
fn upscale(&self, scale: usize) -> VecImage<P> where
P: Copy + Default,
Scales up into a new VecImage
by the given amount. Read more
impl<'a, P: 'a> IndexMut<(usize, usize)> for ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> IndexMut<(usize, usize)> for ImageMutSlice<'a, P>
fn index_mut(&mut self, (x, y): (usize, usize)) -> &mut Self::Output
[src]
fn index_mut(&mut self, (x, y): (usize, usize)) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl<'a, P: 'a> WritableImage<P> for ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> WritableImage<P> for ImageMutSlice<'a, P>
fn as_mut_ptr(&mut self) -> *mut P
[src]
fn as_mut_ptr(&mut self) -> *mut P
Raw mut pointer to the data.
fn get_mut(&mut self, loc: (usize, usize)) -> Option<&mut P>
[src]
fn get_mut(&mut self, loc: (usize, usize)) -> Option<&mut P>
Performs an optional indexing by mut reference, gives None
for out of bounds.
fn slice_mut(&mut self, r: Range<(usize, usize)>) -> ImageMutSlice<P>
[src]
fn slice_mut(&mut self, r: Range<(usize, usize)>) -> ImageMutSlice<P>
Grabs out a mutable sub-slice of the data. Read more
ⓘImportant traits for ImageMutRefIter<'a, P>fn iter_mut(&mut self) -> ImageMutRefIter<P>
[src]
fn iter_mut(&mut self) -> ImageMutRefIter<P>
Lets you mutably iterate over any writable form of image.
fn set_all(&mut self, pixel: P) where
P: Clone,
[src]
fn set_all(&mut self, pixel: P) where
P: Clone,
Assigns all locations to be the given pixel value.
fn direct_copy<S>(&mut self, src: &S, offset: (isize, isize)) where
S: ReadableImage<P>,
P: Copy,
[src]
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
fn flip_vertical(&mut self)
[src]
fn flip_vertical(&mut self)
Flips the image vertically. Read more
fn flip_horizontal(&mut self)
[src]
fn flip_horizontal(&mut self)
Flips the image horizontally. Read more
fn inplace_counterclockwise90_square(&mut self) -> Option<()>
[src]
fn inplace_counterclockwise90_square(&mut self) -> Option<()>
Performs a 90 degrees counter-clockwise rotation, in place. Read more
fn blit_generic<RI, F>(&mut self, src: &RI, offset: (isize, isize), op: F) where
RI: ReadableImage<P>,
F: FnMut(P, P) -> P,
P: Copy,
[src]
fn blit_generic<RI, F>(&mut self, src: &RI, offset: (isize, isize), op: F) where
RI: ReadableImage<P>,
F: FnMut(P, P) -> P,
P: Copy,
Modifies this image by overlaying the source image at the offset given. Read more
impl<'a> WritableImageU16Ext for ImageMutSlice<'a, u16>
[src]
impl<'a> WritableImageU16Ext for ImageMutSlice<'a, u16>
fn blit_rgba16<RI>(&mut self, src: &RI, offset: (isize, isize)) where
RI: ReadableImage<u16>,
[src]
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
impl<'a> WritableImageU32Ext for ImageMutSlice<'a, u32>
[src]
impl<'a> WritableImageU32Ext for ImageMutSlice<'a, u32>
fn blit_blend_rectilinear<RI>(&mut self, src: &RI, offset: (isize, isize)) where
RI: ReadableImage<u32>,
[src]
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: 'a> IntoIterator for ImageMutSlice<'a, P>
[src]
impl<'a, P: 'a> IntoIterator for ImageMutSlice<'a, P>
Auto Trait Implementations
impl<'a, P> !Send for ImageMutSlice<'a, P>
impl<'a, P> !Send for ImageMutSlice<'a, P>
impl<'a, P> !Sync for ImageMutSlice<'a, P>
impl<'a, P> !Sync for ImageMutSlice<'a, P>