pub struct ContourMeasure { /* private fields */ }Expand description
One contour, measured. Build these with crate::Path::measure.
Implementations§
Source§impl ContourMeasure
impl ContourMeasure
pub fn length(&self) -> f32
pub fn is_closed(&self) -> bool
Sourcepub fn sample(&self, distance: f32) -> PathSample
pub fn sample(&self, distance: f32) -> PathSample
Position and tangent distance along the contour. Distances outside
the contour clamp to its ends, matching Skia — a caller animating past
the end gets the final point, not a wrapped or missing one.
Trait Implementations§
Source§impl Clone for ContourMeasure
impl Clone for ContourMeasure
Source§fn clone(&self) -> ContourMeasure
fn clone(&self) -> ContourMeasure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContourMeasure
impl RefUnwindSafe for ContourMeasure
impl Send for ContourMeasure
impl Sync for ContourMeasure
impl Unpin for ContourMeasure
impl UnsafeUnpin for ContourMeasure
impl UnwindSafe for ContourMeasure
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