[−][src]Struct andrew::shapes::rectangle::Rectangle
A drawable object that represents a rectangle
Fields
pos: (usize, usize)
Position of the top-left corner of rectangle
size: (usize, usize)
The size of the rectangle to be drawn, the border will be contained within this size
border: Option<(usize, [u8; 4], Sides, Option<usize>)>
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
fill: Option<[u8; 4]>
The color of the fill (area) of the rectangle
Methods
impl Rectangle
[src]
pub fn new(
pos: (usize, usize),
size: (usize, usize),
border: Option<(usize, [u8; 4], Sides, Option<usize>)>,
fill: Option<[u8; 4]>
) -> Rectangle
[src]
pos: (usize, usize),
size: (usize, usize),
border: Option<(usize, [u8; 4], Sides, Option<usize>)>,
fill: Option<[u8; 4]>
) -> Rectangle
Creates a new Rectangle object
Trait Implementations
Auto Trait Implementations
impl Send for Rectangle
impl Unpin for Rectangle
impl Sync for Rectangle
impl UnwindSafe for Rectangle
impl RefUnwindSafe for Rectangle
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,