pub type DrawingTexture<'a> = Drawing<'a, Texture>;
Expand description

The drawing context for a Rect.

Aliased Type§

struct DrawingTexture<'a> { /* private fields */ }

Implementations§

source§

impl<'a> DrawingTexture<'a>

source

pub fn area(self, rect: Rect) -> Self

Specify the area of the texture to draw.

The bounds of the rectangle should represent the desired area as texture coordinates of the underlying texture.

Texture coordinates range from (0.0, 0.0) in the bottom left of the texture, to (1.0, 1.0) in the top right of the texture.

By default, the area represents the full extent of the texture.