pub struct Rectangle {
pub border: Option<Border>,
pub color: ColorKind,
pub radius: f32,
pub corners: Vec<Corners>,
}Expand description
An attribute to represent a rectangle rendered in the layer.
The size of the rectangle is specified by the layer’s size.
Fields§
§border: Option<Border>The Border (if specified) to render around the rectangle.
color: ColorKindThe color used to fill the rectangle.
radius: f32The radius of the rendered Rectangle::corners.
The renderer shall limit this value if it is
greater than half the minimum of the rectangle’s width or height
(see Layer::size).
corners: Vec<Corners>A list of the Corners in which the radius is applied.
Any Corners not in this list will not be rounded.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rectangle
impl<'de> Deserialize<'de> for Rectangle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnsafeUnpin 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