pub trait GradientFunction {
// Required method
fn calculate(&self, x: i32, y: i32, d: i32) -> i32;
}Expand description
Trait for gradient shape functions.
Maps a 2D point (x, y) to a scalar distance value. The d parameter
is the gradient diameter/range (used by some gradient types like XY, conic).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".