Struct lyon::bezier::CubicBezierSegment
[−]
pub struct CubicBezierSegment {
pub from: TypedPoint2D<f32, UnknownUnit>,
pub ctrl1: TypedPoint2D<f32, UnknownUnit>,
pub ctrl2: TypedPoint2D<f32, UnknownUnit>,
pub to: TypedPoint2D<f32, UnknownUnit>,
}Fields
from: TypedPoint2D<f32, UnknownUnit>
ctrl1: TypedPoint2D<f32, UnknownUnit>
ctrl2: TypedPoint2D<f32, UnknownUnit>
to: TypedPoint2D<f32, UnknownUnit>
Methods
impl CubicBezierSegment
fn sample(&self, t: f32) -> TypedPoint2D<f32, UnknownUnit>
fn split(&self, t: f32) -> (CubicBezierSegment, CubicBezierSegment)
Split this curve into two sub-curves.
fn before_split(&self, t: f32) -> CubicBezierSegment
Return the curve before the split point.
fn after_split(&self, t: f32) -> CubicBezierSegment
Return the curve after the split point.
fn flattening_iter(&self, tolerance: f32) -> CubicFlatteningIter
Returns the flattened representation of the curve as an iterator, starting after the current point.
fn flattened_for_each<F>(&self, tolerance: f32, call_back: &mut F) where F: FnMut(TypedPoint2D<f32, UnknownUnit>) -> ()
Iterates through the curve invoking a callback at each point.