pub struct FunctionGraph { /* private fields */ }Expand description
A deterministically sampled function/parametric curve with finite output. Callbacks must be pure; their panics propagate like other user callbacks.
Implementations§
Source§impl FunctionGraph
impl FunctionGraph
Sourcepub fn new(
function: impl Fn(f64) -> f64 + Send + Sync + 'static,
domain: Range<f64>,
) -> Self
pub fn new( function: impl Fn(f64) -> f64 + Send + Sync + 'static, domain: Range<f64>, ) -> Self
Samples y=f(x), including both domain endpoints, with 128 default points.
Trait Implementations§
Source§impl Clone for FunctionGraph
impl Clone for FunctionGraph
Source§impl Debug for FunctionGraph
impl Debug for FunctionGraph
Source§impl Shape for FunctionGraph
impl Shape for FunctionGraph
Source§fn path(&self) -> Result<Path2D, ValidationError>
fn path(&self) -> Result<Path2D, ValidationError>
Returns a checked path snapshot without f32 narrowing.
Source§fn bounding_box(&self) -> Result<Rect, ValidationError>
fn bounding_box(&self) -> Result<Rect, ValidationError>
Geometric bounds; defaults to the path’s cached curve bounds.
Source§fn as_rect(&self) -> Option<Rect>
fn as_rect(&self) -> Option<Rect>
Exact rectangle equivalent, when available, for a rule-independent fast path.
Auto Trait Implementations§
impl !RefUnwindSafe for FunctionGraph
impl !UnwindSafe for FunctionGraph
impl Forget for FunctionGraph
impl Freeze for FunctionGraph
impl Move for FunctionGraph
impl Send for FunctionGraph
impl Sync for FunctionGraph
impl Unpin for FunctionGraph
impl UnsafeUnpin for FunctionGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Geometry> IntoShapeClip for Geometrywhere
Geometry: Shape,
impl<Geometry> IntoShapeClip for Geometrywhere
Geometry: Shape,
Source§fn into_shape_clip(self) -> Result<ShapeClip, ValidationError>
fn into_shape_clip(self) -> Result<ShapeClip, ValidationError>
Captures the clip geometry, reporting invalid shapes.