[−][src]Enum svgtypes::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
MoveToFields of MoveTo
LineToFields of LineTo
HorizontalLineToFields of HorizontalLineTo
VerticalLineToFields of VerticalLineTo
CurveToFields of CurveTo
SmoothCurveToFields of SmoothCurveTo
QuadraticFields of Quadratic
SmoothQuadraticFields of SmoothQuadratic
EllipticalArcFields of EllipticalArc
ClosePathFields of ClosePath
abs: boolMethods
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 FuzzyEq<PathSegment> for PathSegment[src]
fn fuzzy_eq(&self, other: &Self) -> bool[src]
fn fuzzy_ne(&self, other: &Rhs) -> bool[src]
Returns true if values are not approximately equal.
impl PartialEq<PathSegment> for PathSegment[src]
fn eq(&self, other: &PathSegment) -> bool[src]
fn ne(&self, other: &PathSegment) -> bool[src]
impl Copy for PathSegment[src]
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 Debug for PathSegment[src]
Auto Trait Implementations
impl Send for PathSegment
impl Sync for PathSegment
Blanket Implementations
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> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for 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,