Trait kurbo::ParamCurveNearest[][src]

pub trait ParamCurveNearest {
    fn nearest(&self, p: Point, accuracy: f64) -> Nearest;
}

A parametrized curve that reports the nearest point.

Required methods

fn nearest(&self, p: Point, accuracy: f64) -> Nearest[src]

Find the position on the curve that is nearest to the given point.

This returns a Nearest struct that contains information about the position.

Loading content...

Implementors

impl ParamCurveNearest for PathSeg[src]

impl ParamCurveNearest for CubicBez[src]

fn nearest(&self, p: Point, accuracy: f64) -> Nearest[src]

Find nearest point, using subdivision.

impl ParamCurveNearest for Line[src]

impl ParamCurveNearest for QuadBez[src]

fn nearest(&self, p: Point, _accuracy: f64) -> Nearest[src]

Find nearest point, using analytical algorithm based on cubic root finding.

Loading content...