#[repr(C, u8)]pub enum SvgPathElement {
Line(SvgLine),
QuadraticCurve(SvgQuadraticCurve),
CubicCurve(SvgCubicCurve),
}Variants§
Implementations§
Source§impl SvgPathElement
impl SvgPathElement
Sourcepub const fn quadratic_curve(qc: SvgQuadraticCurve) -> Self
pub const fn quadratic_curve(qc: SvgQuadraticCurve) -> Self
Creates a quadratic curve path element from a SvgQuadraticCurve
Sourcepub const fn cubic_curve(cc: SvgCubicCurve) -> Self
pub const fn cubic_curve(cc: SvgCubicCurve) -> Self
Creates a cubic curve path element from a SvgCubicCurve
Sourcepub fn get_bounds(&self) -> SvgRect
pub fn get_bounds(&self) -> SvgRect
Returns the axis-aligned bounding rectangle of this path element.
Sourcepub fn get_length(&self) -> f64
pub fn get_length(&self) -> f64
Returns the arc length of this path element.
Sourcepub fn get_t_at_offset(&self, offset: f64) -> f64
pub fn get_t_at_offset(&self, offset: f64) -> f64
Returns the parametric t value at the given arc-length offset.
Sourcepub fn get_tangent_vector_at_t(&self, t: f64) -> SvgVector
pub fn get_tangent_vector_at_t(&self, t: f64) -> SvgVector
Returns the normalized tangent vector at parametric position t.
Sourcepub fn get_x_at_t(&self, t: f64) -> f64
pub fn get_x_at_t(&self, t: f64) -> f64
Returns the X coordinate at parametric position t.
Sourcepub fn get_y_at_t(&self, t: f64) -> f64
pub fn get_y_at_t(&self, t: f64) -> f64
Returns the Y coordinate at parametric position t.
Trait Implementations§
Source§impl Clone for SvgPathElement
impl Clone for SvgPathElement
Source§fn clone(&self) -> SvgPathElement
fn clone(&self) -> SvgPathElement
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 moreSource§impl Debug for SvgPathElement
impl Debug for SvgPathElement
Source§impl FromIterator<SvgPathElement> for SvgPathElementVec
impl FromIterator<SvgPathElement> for SvgPathElementVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SvgPathElement>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = SvgPathElement>,
Creates a value from an iterator. Read more
Source§impl PartialEq for SvgPathElement
impl PartialEq for SvgPathElement
Source§fn eq(&self, other: &SvgPathElement) -> bool
fn eq(&self, other: &SvgPathElement) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SvgPathElement
impl PartialOrd for SvgPathElement
impl Copy for SvgPathElement
impl StructuralPartialEq for SvgPathElement
Auto Trait Implementations§
impl Freeze for SvgPathElement
impl RefUnwindSafe for SvgPathElement
impl Send for SvgPathElement
impl Sync for SvgPathElement
impl Unpin for SvgPathElement
impl UnsafeUnpin for SvgPathElement
impl UnwindSafe for SvgPathElement
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