[−][src]Trait polystrip::geometry::FrameGeometryExt
This trait contains numerous functions to make rendering to a Frame
easier.
Required methods
fn draw_rect(&mut self, bounds: Rect, color: Color)
Draw and fill a Rect
with the specified Color
.
fn draw_texture(&mut self, x: i32, y: i32, texture: &'a Texture)
Draw a rectangular texture at a 1:1 scale at the specified coordinates.
fn draw_texture_scaled(&mut self, destination: Rect, texture: &'a Texture)
Draw a rectangular texture to fit the specified Rect
fn draw_texture_cropped(
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
Draw a rectangular section of a texture at a 1:1 scale at the specified coordinates.
Arguments
source
: The section of the texture to draw. Sampling beyond the bounds of the texture will result in the texture being repeatedx
,y
: The coordinates of the top-left corner of the destination.texture
: A reference to the texture to be drawn
fn draw_texture_cropped_scaled(
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)
Draw a rectangular section of a texture to fit the specified destination Rect
.
Arguments
source
: The section of the texture to draw. Sampling beyond the bounds of the texture will result in the texture being repeateddestination
: The position and size at which to draw the texturetexture
: The texture to be drawn
Implementors
impl<'a> FrameGeometryExt<'a> for Frame<'a>
[src]
fn draw_rect(&mut self, bounds: Rect, color: Color)
[src]
fn draw_texture(&mut self, x: i32, y: i32, texture: &'a Texture)
[src]
fn draw_texture_scaled(&mut self, destination: Rect, texture: &'a Texture)
[src]
fn draw_texture_cropped(
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
[src]
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
fn draw_texture_cropped_scaled(
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)
[src]
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)