pub struct RegularPolygon { /* private fields */ }Expand description
A regular polygon with its first vertex above the center.
Implementations§
Source§impl RegularPolygon
impl RegularPolygon
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 RegularPolygon
impl Clone for RegularPolygon
Source§impl Debug for RegularPolygon
impl Debug for RegularPolygon
Source§impl Shape for RegularPolygon
impl Shape for RegularPolygon
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 RegularPolygon
impl Freeze for RegularPolygon
impl RefUnwindSafe for RegularPolygon
impl Send for RegularPolygon
impl Sync for RegularPolygon
impl Unpin for RegularPolygon
impl UnsafeUnpin for RegularPolygon
impl UnwindSafe for RegularPolygon
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