pub struct Canvas { /* fields omitted */ }
Expand description
A 2D image. See the module’s documentation for more information.
Creates a new canvas with the given width and height. The new canvas is entirely black.
Returns self
’s width, that is the number of columns in the image.
Returns self
’s height, that is the number of rows in the image.
Writes self
to file
in PPM format. See the module’s documentation for an example.
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.