Struct graphics::rectangle::Rectangle [] [src]

pub struct Rectangle {
    pub color: Color,
    pub shape: Shape,
    pub border: Option<Border>,
}

A filled rectangle

Fields

The rectangle color

The roundness of the rectangle

The border

Methods

impl Rectangle
[src]

Creates a new rectangle.

Creates a new rectangle with rounded corners.

Creates a new rectangle border.

Creates a new rectangle border with rounded corners.

Sets color.

Sets shape of the corners.

Sets border properties.

Sets optional border.

Draws the rectangle using the default method.

rectangle defines the rectangle's location and dimensions, draw_state draw state, draw_state::Default::default() can be used as a default, transform is the transformation matrix, g is the Graphics implementation, that is used to actually draw the rectangle.s

Draws the rectangle using triangulation.

This is the default implementation of draw() that will be used if G does not redefine Graphics::rectangle().

Trait Implementations

impl Colored for Rectangle
[src]

Multiplies with red, green, blue and alpha values.

Rotates hue by radians.

Mixes the current color with white. Read more

Mixes the current color with black. Read more

Rotates hue by degrees.

impl Copy for Rectangle
[src]

impl Clone for Rectangle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more