[][src]Trait kurbo::ParamCurveExtrema

pub trait ParamCurveExtrema: ParamCurve {
    fn extrema(&self) -> ArrayVec<[f64; 4]>;

    fn extrema_ranges(&self) -> ArrayVec<[Range<f64>; 5]> { ... }
fn bounding_box(&self) -> Rect { ... } }

A parametrized curve that reports its extrema.

Required methods

fn extrema(&self) -> ArrayVec<[f64; 4]>

Compute the extrema of the curve.

Only extrema within the interior of the curve count. At most four extrema can be reported, which is sufficient for cubic Béziers.

The extrema should be reported in increasing parameter order.

Loading content...

Provided methods

fn extrema_ranges(&self) -> ArrayVec<[Range<f64>; 5]>

Return parameter ranges, each of which is monotonic within the range.

fn bounding_box(&self) -> Rect

The smallest rectangle that encloses the curve in the range (0..1).

Loading content...

Implementors

impl ParamCurveExtrema for PathSeg[src]

impl ParamCurveExtrema for CubicBez[src]

impl ParamCurveExtrema for Line[src]

impl ParamCurveExtrema for QuadBez[src]

Loading content...