Struct mold2d::sprite::SpriteRectangle [] [src]

pub struct SpriteRectangle {
    pub x: i32,
    pub y: i32,
    pub w: u32,
    pub h: u32,
}

A mutable rectangle for a sprite so it can be moved around

Fields

Methods

impl SpriteRectangle
[src]

Creates a sprite rectangle from a SDL2 rectangle

Returns a SDL Rect created from the SpriteRectangle Used for rendering SpriteRectangles in SDL

Mutates a sprite rectangle based on the position change given

Trait Implementations

impl Collision<Rect> for SpriteRectangle
[src]

impl Collision<SpriteRectangle> for SpriteRectangle
[src]

impl Clone for SpriteRectangle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for SpriteRectangle
[src]

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

This method tests for !=.