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§
source§impl 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
sourcepub fn blend(&self, other: &Image) -> Result<Image, GraphicsError>
pub fn blend(&self, other: &Image) -> Result<Image, GraphicsError>
Blend two images making a new one