pub struct MarkerGeometry { /* private fields */ }Expand description
A validated shape plus an additional rotation.
Implementations§
Source§impl MarkerGeometry
impl MarkerGeometry
Sourcepub fn new(shape: MarkerShape) -> Result<Self, MarkerError>
pub fn new(shape: MarkerShape) -> Result<Self, MarkerError>
Construct validated geometry.
Sourcepub fn rotated(self, rotation_deg: f64) -> Result<Self, MarkerError>
pub fn rotated(self, rotation_deg: f64) -> Result<Self, MarkerError>
Add a finite counter-clockwise rotation in degrees.
Sourcepub const fn shape(self) -> MarkerShape
pub const fn shape(self) -> MarkerShape
Return the canonical shape.
Sourcepub const fn rotation_deg(self) -> f64
pub const fn rotation_deg(self) -> f64
Return the additional rotation.
Sourcepub const fn is_fillable(self) -> bool
pub const fn is_fillable(self) -> bool
Whether this geometry supports fills.
Sourcepub fn outline(self) -> Result<Vec<LocalPoint>, MarkerError>
pub fn outline(self) -> Result<Vec<LocalPoint>, MarkerError>
Return a normalized, centred outer outline.
Sourcepub fn stroke_segments(self) -> Result<Vec<LocalSegment>, MarkerError>
pub fn stroke_segments(self) -> Result<Vec<LocalSegment>, MarkerError>
Return stroke-only local segments.
Trait Implementations§
Source§impl Clone for MarkerGeometry
impl Clone for MarkerGeometry
impl Copy for MarkerGeometry
Source§impl Debug for MarkerGeometry
impl Debug for MarkerGeometry
Source§impl PartialEq for MarkerGeometry
impl PartialEq for MarkerGeometry
impl StructuralPartialEq for MarkerGeometry
Auto Trait Implementations§
impl Freeze for MarkerGeometry
impl RefUnwindSafe for MarkerGeometry
impl Send for MarkerGeometry
impl Sync for MarkerGeometry
impl Unpin for MarkerGeometry
impl UnsafeUnpin for MarkerGeometry
impl UnwindSafe for MarkerGeometry
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