pub trait ParamCurveExtrema: ParamCurve {
// Required method
fn extrema(
&self,
) -> ArrayVec<f64, kurbo::::param_curve::ParamCurveExtrema::extrema::{constant#0}>;
// Provided methods
fn extrema_ranges(
&self,
) -> ArrayVec<Range<f64>, kurbo::::param_curve::ParamCurveExtrema::extrema_ranges::{constant#0}> { ... }
fn bounding_box(&self) -> Rect { ... }
}
Expand description
A parameterized curve that reports its extrema.
Required Methods§
Sourcefn extrema(
&self,
) -> ArrayVec<f64, kurbo::::param_curve::ParamCurveExtrema::extrema::{constant#0}>
fn extrema( &self, ) -> ArrayVec<f64, kurbo::::param_curve::ParamCurveExtrema::extrema::{constant#0}>
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.
Provided Methods§
Sourcefn extrema_ranges(
&self,
) -> ArrayVec<Range<f64>, kurbo::::param_curve::ParamCurveExtrema::extrema_ranges::{constant#0}>
fn extrema_ranges( &self, ) -> ArrayVec<Range<f64>, kurbo::::param_curve::ParamCurveExtrema::extrema_ranges::{constant#0}>
Return parameter ranges, each of which is monotonic within the range.
Sourcefn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
The smallest rectangle that encloses the curve in the range (0..1).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.