Struct buffer_graphics_lib::image::Image
source · [−]pub struct Image { /* private fields */ }
Expand description
Images are rectangles of pixels that can be manipulated and drawn on screen
Implementations
sourceimpl Image
impl Image
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn get_pixel(&self, x: usize, y: usize) -> Color
pub fn set_pixel(&mut self, x: usize, y: usize, value: Color)
sourcepub fn flip_horizontal(&mut self)
pub fn flip_horizontal(&mut self)
Flip image horizontally
sourcepub fn flip_vertical(&mut self)
pub fn flip_vertical(&mut self)
Flip image vertically
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more