Enum svgdom::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

Fields of MoveTo

Fields of LineTo

Fields of HorizontalLineTo

Fields of VerticalLineTo

Fields of CurveTo

Fields of SmoothCurveTo

Fields of Quadratic

Fields of SmoothQuadratic

Fields of EllipticalArc

Fields of ClosePath

Methods

impl PathSegment
[src]

[src]

Sets the segment absolute value.

[src]

Returns a segment type.

[src]

Returns true if the segment is absolute.

[src]

Returns true if the segment is relative.

[src]

Returns the x coordinate of the segment if it has one.

[src]

Returns the y coordinate of the segment if it has one.

Trait Implementations

impl FuzzyEq<PathSegment> for PathSegment
[src]

[src]

Returns true if values are approximately equal.

[src]

Returns true if values are not approximately equal.

impl Copy for PathSegment
[src]

impl PartialEq<PathSegment> for PathSegment
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Clone for PathSegment
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PathSegment
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for PathSegment

impl Sync for PathSegment