Struct lyon_bezier::QuadraticBezierSegment
[−]
[src]
pub struct QuadraticBezierSegment { pub from: Vec2, pub ctrl: Vec2, pub to: Vec2, }
Fields
from: Vec2
ctrl: Vec2
to: Vec2
Methods
impl QuadraticBezierSegment
[src]
fn sample(&self, t: f32) -> Point
fn sample_x(&self, t: f32) -> f32
fn sample_y(&self, t: f32) -> f32
fn flip(&mut self)
fn find_y_maximum(&self) -> f32
Find the advancement of the y-most position in the curve.
This returns the advancement along the curve, not the actual y position.
fn find_y_inflection(&self) -> Option<f32>
Return the y inflection point or None if this curve is y-monotone.
fn split(&self, t: f32) -> (QuadraticBezierSegment, QuadraticBezierSegment)
Split this curve into two sub-curves.
fn before_split(&self, t: f32) -> QuadraticBezierSegment
Return the curve before the split point.
fn after_split(&self, t: f32) -> QuadraticBezierSegment
Return the curve after the split point.
fn to_cubic(&self) -> CubicBezierSegment
Elevate this curve to a third order bezier.
fn flattening_step(&self, tolerance: f32) -> f32
Find the interval of the begining of the curve that can be approximated with a line segment.
fn flattened_for_each<F: FnMut(Point)>(&self, tolerance: f32, call_back: &mut F)
Iterates through the curve invoking a callback at each point.
fn flattening_iter(&self, tolerance: f32) -> QuadraticFlatteningIter
Returns the flattened representation of the curve as an iterator, starting after the current point.
Trait Implementations
impl Copy for QuadraticBezierSegment
[src]
impl Clone for QuadraticBezierSegment
[src]
fn clone(&self) -> QuadraticBezierSegment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more