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]

[src]

Creates a new rectangle.

[src]

Creates a new rectangle with rounded corners.

[src]

Creates a new rectangle border.

[src]

Creates a new rectangle border with rounded corners.

[src]

Sets color.

[src]

Sets shape of the corners.

[src]

Sets border properties.

[src]

Sets optional border.

[src]

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

[src]

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]

[src]

Multiplies with red, green, blue and alpha values.

[src]

Rotates hue by radians.

[src]

Mixes the current color with white. Read more

[src]

Mixes the current color with black. Read more

[src]

Rotates hue by degrees.

impl Copy for Rectangle
[src]

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