pub struct Rectangle {
pub line_style: LineStyle,
pub top_left: (f64, f64),
pub dimensions: (f64, f64),
pub fill_color: Option<Color>,
}
Expand description
A drawable rectangle
Fields§
§line_style: LineStyle
the style of the border
top_left: (f64, f64)
point y and point y (in pixels)
dimensions: (f64, f64)
width and height (in pixels)
fill_color: Option<Color>
if some, the square will be filled by this color
Implementations§
Trait Implementations§
Source§impl Drawable for Rectangle
impl Drawable for Rectangle
Source§fn draw_on_canvas(&self, canvas: &mut Canvas)
fn draw_on_canvas(&self, canvas: &mut Canvas)
This method is called by the draw method.
Auto Trait Implementations§
impl Freeze for Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more