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
sourceimpl RectShape
impl RectShape
pub fn filled(
rect: Rect,
rounding: impl Into<Rounding>,
fill_color: impl Into<Color32>
) -> RectShape
pub fn stroke(
rect: Rect,
rounding: impl Into<Rounding>,
stroke: impl Into<Stroke>
) -> RectShape
sourcepub fn visual_bounding_rect(&self) -> Rect
pub fn visual_bounding_rect(&self) -> Rect
The visual bounding rectangle (includes stroke width)
Trait Implementations
impl Copy for RectShape
impl StructuralPartialEq for RectShape
Auto Trait Implementations
impl RefUnwindSafe for RectShape
impl Send for RectShape
impl Sync for RectShape
impl Unpin for RectShape
impl UnwindSafe for RectShape
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more