Trait flo_curves::BezierCurveFactory
source · 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>> { ... }
}
Expand description
Trait implemented by bezier curves that can create new versions of themselves
Required Methods
Provided Methods
sourcefn from_curve<Curve: BezierCurve<Point = Self::Point>>(curve: &Curve) -> Self
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