Struct kurbo::QuadBez [−][src]
Expand description
A single quadratic Bézier segment.
Fields
p0: Point
p1: Point
p2: Point
Implementations
Create a new quadratic Bézier segment.
Raise the order by 1.
Returns a cubic Bézier segment that exactly represents this quadratic.
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 quadratic Bézier segment.
This computation is based on an analytical formula. Since that formula suffers from numerical instability when the curve is very close to a straight line, we detect that case and fall back to Legendre-Gauss quadrature.
Accuracy should be better than 1e-13 over the entire range.
Adapted from http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/ with permission.
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 = QuadBezIter
type PathElementsIter = QuadBezIter
The iterator returned by the path_elements
method. Read more
fn path_elements(&self, _tolerance: f64) -> QuadBezIterⓘNotable traits for QuadBezIterimpl Iterator for QuadBezIter type Item = PathEl;
fn path_elements(&self, _tolerance: f64) -> QuadBezIterⓘNotable traits for QuadBezIterimpl Iterator for QuadBezIter type Item = PathEl;
impl Iterator for QuadBezIter 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 QuadBez
impl UnwindSafe for QuadBez
Blanket Implementations
Mutably borrows from an owned value. Read more