HeatFunctions
struct · ferroui-livecharts · v0.5.0
struct HeatFunctions
The heat functions of the source (HeatFunctions).
Members
build_color_stops
fn build_color_stops(heat_map: &[Color], color_stops: Option<&[f64]>) -> Result<Vec<(f64, Color)>, ChartError>
The stops of a heat map (BuildColorStops): the given offsets, or offsets spread evenly
from 0 to 1. A heat map of fewer than two colours, or offsets of another count, is an error
where the source throws.
interpolate_color
fn interpolate_color(weight: f64, weight_bounds: &Bounds, heat_map: &[Color], heat_stops: &[(f64, Color)]) -> Color
The colour of a weight (InterpolateColor): its position between the bounds, clamped to
[0, 1], interpolated between the stops around it, each channel truncated as the source's
byte conversion; past the last stop, the last colour of the heat map. A zero range puts
every weight at the start.
Where the source extrapolates (a position before the first stop, two stops at the same offset, a weight that is not a number) the colour is the nearest stop's.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.