[−][src]Enum svgdom::PathSegment
Representation of the path segment.
If you want to change the segment type (for example MoveTo to LineTo) you should create a new segment. But you still can change points or make segment relative or absolute.
Variants
MoveTo
Fields of MoveTo
LineTo
Fields of LineTo
HorizontalLineTo
Fields of HorizontalLineTo
VerticalLineTo
Fields of VerticalLineTo
CurveTo
Fields of CurveTo
SmoothCurveTo
Fields of SmoothCurveTo
Quadratic
Fields of Quadratic
SmoothQuadratic
Fields of SmoothQuadratic
EllipticalArc
Fields of EllipticalArc
ClosePath
Fields of ClosePath
abs: bool
Methods
impl PathSegment
[src]
pub fn set_absolute(&mut self, new_abs: bool)
[src]
Sets the segment absolute value.
pub fn cmd(&self) -> PathCommand
[src]
Returns a segment type.
pub fn is_absolute(&self) -> bool
[src]
Returns true
if the segment is absolute.
pub fn is_relative(&self) -> bool
[src]
Returns true
if the segment is relative.
pub fn x(&self) -> Option<f64>
[src]
Returns the x
coordinate of the segment if it has one.
pub fn y(&self) -> Option<f64>
[src]
Returns the y
coordinate of the segment if it has one.
Trait Implementations
impl Debug for PathSegment
[src]
impl FuzzyEq<PathSegment> for PathSegment
[src]
fn fuzzy_eq(&self, other: &PathSegment) -> bool
[src]
fn fuzzy_ne(&self, other: &Rhs) -> bool
[src]
Returns true
if values are not approximately equal.
impl Clone for PathSegment
[src]
fn clone(&self) -> PathSegment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for PathSegment
[src]
impl PartialEq<PathSegment> for PathSegment
[src]
fn eq(&self, other: &PathSegment) -> bool
[src]
fn ne(&self, other: &PathSegment) -> bool
[src]
Auto Trait Implementations
impl Unpin for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl UnwindSafe for PathSegment
impl RefUnwindSafe for PathSegment
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,