Struct kurbo::CubicBez [−][src]
Expand description
A single cubic Bézier segment.
Fields
p0: Point
p1: Point
p2: Point
p3: Point
Implementations
Create a new cubic Bézier segment.
Convert to quadratic Béziers.
The iterator returns the start and end parameter in the cubic of each quadratic segment, along with the quadratic.
Note that the resulting quadratic Béziers are not in general G1 continuous; they are optimized for minimizing distance error.
This iterator will always produce at least one QuadBez
.
Return a QuadSpline
approximating this cubic Bézier.
Returns None
if no suitable approximation is found within the given
tolerance.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Get a subsegment of the curve for the given parameter range.
Arclength of a cubic Bézier segment.
This is an adaptive subdivision approach using Legendre-Gauss quadrature in the base case, and an error estimate to decide when to subdivide.
Compute the signed area under the curve. Read more
Return parameter ranges, each of which is monotonic within the range.
The smallest rectangle that encloses the curve in the range (0..1).
type PathElementsIter = CubicBezIter
type PathElementsIter = CubicBezIter
The iterator returned by the path_elements
method. Read more
fn path_elements(&self, _tolerance: f64) -> CubicBezIterⓘNotable traits for CubicBezIterimpl Iterator for CubicBezIter type Item = PathEl;
fn path_elements(&self, _tolerance: f64) -> CubicBezIterⓘNotable traits for CubicBezIterimpl Iterator for CubicBezIter type Item = PathEl;
impl Iterator for CubicBezIter type Item = PathEl;
The smallest rectangle that encloses the shape.
If the shape is a rounded rectangle, make it available.
Auto Trait Implementations
impl RefUnwindSafe for CubicBez
impl UnwindSafe for CubicBez
Blanket Implementations
Mutably borrows from an owned value. Read more