[][src]Trait flo_curves::bezier::BezierCurveFactory

pub trait BezierCurveFactory: BezierCurve {
    fn from_points(
        start: Self::Point,
        control_points: (Self::Point, Self::Point),
        end: Self::Point
    ) -> Self; fn from_curve<Curve: BezierCurve<Point = Self::Point>>(
        curve: &Curve
    ) -> Self { ... }
fn fit_from_points(
        points: &[Self::Point],
        max_error: f64
    ) -> Option<Vec<Self>> { ... } }

Trait implemented by bezier curves that can create new versions of themselves

Required methods

fn from_points(
    start: Self::Point,
    control_points: (Self::Point, Self::Point),
    end: Self::Point
) -> Self

Creates a new bezier curve of the same type from some points

Loading content...

Provided methods

fn from_curve<Curve: BezierCurve<Point = Self::Point>>(curve: &Curve) -> Self

Creates a new bezier curve of this type from an equivalent curve of another type

fn fit_from_points(points: &[Self::Point], max_error: f64) -> Option<Vec<Self>>

Generates a curve by attempting to find a best fit against a set of points

Loading content...

Implementors

impl<Coord: Coordinate> BezierCurveFactory for Curve<Coord>[src]

Loading content...