Type Definition ggez::graphics::Canvas [] [src]

type Canvas = CanvasGeneric<GlBackendSpec>;

A canvas that can be rendered to instead of the screen (sometimes referred to as "render target" or "render to texture"). Set the canvas with the ggez::graphics::set_canvas() function, and then anything you draw will be drawn to the canvas instead of the screen.

Resume drawing to the screen by calling ggez::graphics::set_canvas(None).

Methods

impl Canvas
[src]

[src]

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

[src]

Create a new canvas with the current window dimensions.

[src]

Gets the backend Image that is being rendered to.

[src]

Destroys the Canvas and returns the Image it contains.

Trait Implementations

impl Drawable for Canvas
[src]

[src]

Actually draws the object to the screen. Read more

[src]

Sets the blend mode to be used when drawing this drawable. This overrides the general graphics::set_blend_mode(). If None is set, defers to the blend mode set by graphics::set_blend_mode(). Read more

[src]

Gets the blend mode to be used when drawing this drawable.

[src]

Draws the drawable onto the rendering target. Read more

Auto Trait Implementations