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
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 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
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for BezierCurveItem
impl Send for BezierCurveItem
impl Sync for BezierCurveItem
impl Unpin for BezierCurveItem
impl UnwindSafe for BezierCurveItem
Blanket Implementations
Mutably borrows from an owned value. Read more