Struct ggez::graphics::DrawParam [] [src]

pub struct DrawParam {
    pub src: Rect,
    pub dest: Point2,
    pub rotation: f32,
    pub scale: Point2,
    pub offset: Point2,
    pub shear: Point2,
    pub color: Option<Color>,
}

A struct containing all the necessary info for drawing a Drawable.

This struct implements the Default trait, so you can just do:

graphics::draw_ex(ctx, drawable, DrawParam{ dest: my_dest, .. Default::default()} )

Fields

a portion of the drawable to clip, as a fraction of the whole image. Defaults to the whole image (1.0) if omitted.

the position to draw the graphic expressed as a Point2.

orientation of the graphic in radians.

x/y scale factors expressed as a Point2.

specifies an offset from the center for transform operations like scale/rotation.

x/y shear factors expressed as a Point2.

A color to draw the target with. If None, the color set by graphics::set_color() is used; default white.

Trait Implementations

impl Debug for DrawParam
[src]

[src]

Formats the value using the given formatter.

impl Copy for DrawParam
[src]

impl Clone for DrawParam
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for DrawParam
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Default for DrawParam
[src]

[src]

Returns the "default value" for a type. Read more