Enum beziercurve_wkt::BezierCurveItem[][src]

pub enum BezierCurveItem {
    Line(Line),
    QuadraticCurve(QuadraticCurve),
    CubicCurve(CubicCurve),
}

Variants

Line(Line)

Tuple Fields of Line

0: Line
QuadraticCurve(QuadraticCurve)

Tuple Fields of QuadraticCurve

0: QuadraticCurve
CubicCurve(CubicCurve)

Tuple Fields of CubicCurve

0: CubicCurve

Implementations

Returns the start point of the curve

Returns the end point of the curve

Parses the BezierCurveItem from a string

let parsed1 = BezierCurveItem::from_str("(0.0 1.0, 2.0 1.0)").unwrap();
assert_eq!(parsed1, Line((Point { x: 0.0, y: 1.0 }, Point { x: 2.0, y: 1.0 })));

let parsed2 = BezierCurveItem::from_str("(0.0 1.0, 2.0 1.0, 3.0 4.0)").unwrap();
assert_eq!(parsed2, QuadraticCurve((Point { x: 0.0, y: 1.0 }, Point { x: 2.0, y: 1.0 }, Point { x: 3.0, y: 4.0 })));

Returns the x

max value of the BezierCurveItem - useful for calculating bounding boxes

Returns the x

min value of the BezierCurveItem - useful for calculating bounding boxes

Returns the y

max value of the BezierCurveItem - useful for calculating bounding boxes

Returns the y

min value of the BezierCurveItem - useful for calculating bounding boxes

Returns the bounding box of this item

Returns the intersection of two items (line-curve, curve-curve or line-line intersection).

Warning: calling this function is expensive, it’s recommended to cull items that don’t intersect first by intersecting their bounding boxes.

Returns the normal of the curve / line at t

Splits the curve / line into two curves / lines

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.