pub struct RenderingContext<'frame, 'texture_creator> {
    pub canvas: &'frame mut Canvas<Window>,
    pub font_texture: &'frame mut FontTexture<'texture_creator>,
    pub fonts: &'frame [Font],
}
Expand description

Utility functions for drawing. This struct owns the main things required for any drawing.

Fields

canvas: &'frame mut Canvas<Window>font_texture: &'frame mut FontTexture<'texture_creator>fonts: &'frame [Font]

Implementations

Draws a box with some text in the top-left corner of the screen.

Draws the sprite for the given tile index at the given position.

Draws a rectangle around the given region (length unit: tiles) for visualizing areas on the map.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.