Struct retro_pixel::NESImage [−][src]
pub struct NESImage { /* fields omitted */ }
An image the size of an NES screen, backed by an array.
This is a fairly big thing to have on the stack (~61k), so go easy with it, or stick it in a global somewhere.
Trait Implementations
impl Clone for NESImage
[src]
impl Clone for NESImage
fn clone(&self) -> NESImage
[src]
fn clone(&self) -> NESImage
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 Debug for NESImage
[src]
impl Debug for NESImage
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 Default for NESImage
[src]
impl Default for NESImage
impl Index<(usize, usize)> for NESImage
[src]
impl Index<(usize, usize)> for NESImage
type Output = u8
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 ReadableImage<u8> for NESImage
[src]
impl ReadableImage<u8> for NESImage
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 u8
[src]
fn as_ptr(&self) -> *const u8
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 IndexMut<(usize, usize)> for NESImage
[src]
impl IndexMut<(usize, usize)> for NESImage
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 WritableImage<u8> for NESImage
[src]
impl WritableImage<u8> for NESImage
fn as_mut_ptr(&mut self) -> *mut u8
[src]
fn as_mut_ptr(&mut self) -> *mut u8
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