Struct ggez::graphics::CanvasGeneric[][src]

pub struct CanvasGeneric<Spec> where
    Spec: BackendSpec
{ /* fields omitted */ }
Expand description

A generic canvas independent of graphics backend. This type should never need to be used directly; use graphics::Canvas instead.

Implementations

Create a new Canvas with the given size and number of samples.

WARNING: `Canvases with samples != NumSamples::One are currently broken, see https://github.com/ggez/ggez/issues/695

Create a new Canvas with the current window dimensions.

Gets the backend Image that is being rendered to. Note that this will be flipped but otherwise the same, use the to_image function for the unflipped version.

Creates an Image with the content of its raw counterpart but transformed to behave like a normal Image.

Gets the backend Target that is being rendered to.

Dumps the flipped Canvas’s data to a Vec of u8 RBGA8 values.

Encode the Canvas’s content to the given file format and write it out to the given path.

See the filesystem module docs for where exactly the file will end up.

Return the width of the canvas.

Return the height of the canvas.

Returns the dimensions of the canvas.

Get the filter mode for the canvas.

Set the filter mode for the canvas.

Trait Implementations

Formats the value using the given formatter. 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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.