Struct ggez::graphics::DrawParam
[−]
[src]
pub struct DrawParam { pub src: Rect, pub dest: Point, pub rotation: f32, pub scale: Point, pub offset: Point, pub shear: Point, }
A struct containing all the necessary info for drawing a Drawable.
src
- a portion of the drawable to clip, as a fraction of the whole image. Defaults to the whole image (1.0) if omitted.dest
- the position to draw the graphic expressed as aPoint
.rotation
- orientation of the graphic in radians.scale
- x/y scale factors expressed as aPoint
.offset
- specifies an offset from the center for transform operations like scale/rotation.shear
- x/y shear factors expressed as aPoint
.
This struct implements the Default
trait, so you can just do:
graphics::draw_ex(ctx, drawable, DrawParam{ dest: my_dest, .. Default::default()} )
Fields
src: Rect
dest: Point
rotation: f32
scale: Point
offset: Point
shear: Point
Trait Implementations
impl Debug for DrawParam
[src]
impl Copy for DrawParam
[src]
impl Clone for DrawParam
[src]
fn clone(&self) -> DrawParam
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for DrawParam
[src]
fn eq(&self, __arg_0: &DrawParam) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DrawParam) -> bool
This method tests for !=
.