Struct ggez::graphics::Rect [] [src]

pub struct Rect {
    pub x: f32,
    pub y: f32,
    pub w: f32,
    pub h: f32,
}

A simple 2D rectangle.

Fields

Methods

impl Rect
[src]

Ceates a new rect a la Love2D's love.graphics.newQuad, as a fraction of the reference rect's size.

Create a new Rect with all values zero.

Creates a new Rect at 0,0 with width and height 1.

Gets the Rect's x and y coordinates as a Point.

Trait Implementations

impl Copy for Rect
[src]

impl Clone for Rect
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Rect
[src]

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

This method tests for !=.

impl Debug for Rect
[src]

Formats the value using the given formatter.

impl Default for Rect
[src]

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

impl From<[f32; 4]> for Rect
[src]

Performs the conversion.