Struct truster::canvas::Canvas[][src]

pub struct Canvas { /* fields omitted */ }
Expand description

A 2D image. See the module’s documentation for more information.

Implementations

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.

Trait Implementations

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.