Struct quicksilver::geom::Rectangle [] [src]

pub struct Rectangle {
    pub x: f32,
    pub y: f32,
    pub width: f32,
    pub height: f32,
}

A rectangle with a top-left position and a size

Fields

Methods

impl Rectangle
[src]

[src]

Create a positioned rectangle with dimensions

[src]

[src]

[src]

Create a rectangle at the origin with the given size

[src]

[src]

[src]

Get the top left coordinate of the Rectangle

[src]

Get the size of the Rectangle

[src]

Get the centerpoint on the rectangle

[src]

Checks if a point falls within the rectangle

[src]

Check if any of the area bounded by this rectangle is bounded by another

[src]

Check if any of the area bounded by this rectangle is bounded by a circle

[src]

Move the rectangle so it is entirely contained with another

[src]

Translate the rectangle by a given vector

[src]

Create a rectangle with the same size at a given center

[src]

Get the top of the rectangle

[src]

Get the left of the rectangle

[src]

Get the bottom of the rectangle

[src]

Get the right of the rectangle

[src]

Check if a line segment intersects a rectangle

Trait Implementations

impl Clone for Rectangle
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Rectangle
[src]

impl Default for Rectangle
[src]

[src]

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

impl Debug for Rectangle
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Rectangle
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for Rectangle
[src]