Struct andrew::shapes::rectangle::Rectangle[][src]

pub struct Rectangle {
    pub pos: (usize, usize),
    pub size: (usize, usize),
    pub border: Option<(usize, [u8; 4], Sides, Option<usize>)>,
    pub fill: Option<[u8; 4]>,
}

A drawable object that represents a rectangle

Fields

Position of the top-left corner of rectangle

The size of the rectangle to be drawn, the border will be contained within this size

The border that is drawn around the perimeter of the rectangle. It's arguments are thickness of border, color of border, sides that the border is drawn around, rounding size of the corners

The color of the fill (area) of the rectangle

Methods

impl Rectangle
[src]

Creates a new Rectangle object

Trait Implementations

impl Drawable for Rectangle
[src]

A function that draws the object to a canvas

Auto Trait Implementations

impl Send for Rectangle

impl Sync for Rectangle