Type Definition nannou::draw::primitive::texture::DrawingTexture[][src]

type DrawingTexture<'a, S = Default> = Drawing<'a, Texture<S>, S>;

The drawing context for a Rect.

Implementations

impl<'a, S> DrawingTexture<'a, S> where
    S: BaseFloat
[src]

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

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.