Enum components::path::PathSegment [−][src]
pub enum PathSegment { MoveTo { abs: bool, x: f64, y: f64, }, LineTo { abs: bool, x: f64, y: f64, }, HorizontalLineTo { abs: bool, x: f64, }, VerticalLineTo { abs: bool, y: f64, }, CurveTo { abs: bool, x1: f64, y1: f64, x2: f64, y2: f64, x: f64, y: f64, }, SmoothCurveTo { abs: bool, x2: f64, y2: f64, x: f64, y: f64, }, Quadratic { abs: bool, x1: f64, y1: f64, x: f64, y: f64, }, SmoothQuadratic { abs: bool, x: f64, y: f64, }, EllipticalArc { abs: bool, rx: f64, ry: f64, x_axis_rotation: f64, large_arc: bool, sweep: bool, x: f64, y: f64, }, ClosePath { abs: bool, }, }
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
Show fields
Show fields
Fields of ClosePath
abs: bool
Implementations
impl PathSegment
[src]
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 Clone for PathSegment
[src]
impl Clone for PathSegment
[src]pub fn clone(&self) -> PathSegment
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PathSegment
[src]
impl Copy for PathSegment
[src]impl FuzzyEq<PathSegment> for PathSegment
[src]
impl FuzzyEq<PathSegment> for PathSegment
[src]impl PartialEq<PathSegment> for PathSegment
[src]
impl PartialEq<PathSegment> for PathSegment
[src]pub fn eq(&self, other: &PathSegment) -> bool
[src]
pub fn ne(&self, other: &PathSegment) -> bool
[src]
impl StructuralPartialEq for PathSegment
[src]
impl StructuralPartialEq for PathSegment
[src]Auto Trait Implementations
impl RefUnwindSafe for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl Unpin for PathSegment
impl UnwindSafe for PathSegment
impl UnwindSafe for PathSegment
Blanket Implementations
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
pub fn into_color(self) -> To
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,