pub struct RoundedRect { /* private fields */ }Expand description
A rectangle with uniformly rounded, clamped corner radii.
Implementations§
Source§impl RoundedRect
impl RoundedRect
Sourcepub fn try_path(&self) -> Result<Path2D, ValidationError>
pub fn try_path(&self) -> Result<Path2D, ValidationError>
Returns checked geometry without resource work or narrowing.
Trait Implementations§
Source§impl Clone for RoundedRect
impl Clone for RoundedRect
Source§impl Debug for RoundedRect
impl Debug for RoundedRect
Source§impl Shape for RoundedRect
impl Shape for RoundedRect
Source§fn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
Geometric bounds; defaults to the path’s cached curve bounds.
Source§fn validate(&self) -> Result<(), ValidationError>
fn validate(&self) -> Result<(), ValidationError>
Reports retained authoring errors before measuring or drawing.
Source§fn as_rect(&self) -> Option<Rect>
fn as_rect(&self) -> Option<Rect>
Exact rectangle equivalent, when available, for a rule-independent fast path.
Auto Trait Implementations§
impl Forget for RoundedRect
impl Freeze for RoundedRect
impl RefUnwindSafe for RoundedRect
impl Send for RoundedRect
impl Sync for RoundedRect
impl Unpin for RoundedRect
impl UnsafeUnpin for RoundedRect
impl UnwindSafe for RoundedRect
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