pub struct RectShape {
pub rect: Rect,
pub rounding: Rounding,
pub fill: Color32,
pub stroke: Stroke,
}
Expand description
How to paint a rectangle.
Fields§
§rect: Rect
§rounding: Rounding
How rounded the corners are. Use Rounding::none()
for no rounding.
fill: Color32
How to fill the rectangle.
stroke: Stroke
The thickness and color of the outline.
Implementations§
source§impl RectShape
impl RectShape
pub fn filled(
rect: Rect,
rounding: impl Into<Rounding>,
fill_color: impl Into<Color32>
) -> Self
pub fn stroke(
rect: Rect,
rounding: impl Into<Rounding>,
stroke: impl Into<Stroke>
) -> Self
sourcepub fn visual_bounding_rect(&self) -> Rect
pub fn visual_bounding_rect(&self) -> Rect
The visual bounding rectangle (includes stroke width)
Trait Implementations§
source§impl<'de> Deserialize<'de> for RectShape
impl<'de> Deserialize<'de> for RectShape
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