Struct lux::graphics::Rectangle
[−]
[src]
#[must_use = "Rectangles only contain context, and must be drawn with `fill()`, `stroke()`, or `fill_stroke()`"]
pub struct Rectangle<'a, C: 'a> {
// some fields omitted
}A Rectangle that can be drawn to the screen.
Methods
impl<'a, C> Rectangle<'a, C> where C: Canvas + 'a
fn fill(&mut self)
Fills the rectangle with a solid color.
fn stroke(&mut self)
Draws a border around the rectangle.
fn fill_and_stroke(&mut self)
Both fills and strokes the rectangle.
fn border<A: Color>(&mut self, border_size: Float, color: A) -> &mut Rectangle<'a, C>
Sets the size of the border. The border is drawn using the
stroke() function.