pub struct Image { /* private fields */ }Expand description
SRGBA 8bits image.
Implementations§
Source§impl Image
impl Image
Sourcepub fn new(width: usize, height: usize) -> Self
pub fn new(width: usize, height: usize) -> Self
Returns a new image with dimensions width✕height.
Sourcepub fn put_pixel(&mut self, x: usize, y: usize, pixel: Pixel)
pub fn put_pixel(&mut self, x: usize, y: usize, pixel: Pixel)
Set the value of pixel at coordinates (x,y).
Sourcepub fn pixels_mut(&mut self) -> &mut Vec<Pixel>
pub fn pixels_mut(&mut self) -> &mut Vec<Pixel>
Get a mutable reference to the underlying pixels Vec<Pixel>.
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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