FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    HeatFunctions

    struct · ferroui-livecharts · v0.5.0

    struct HeatFunctions
    

    The heat functions of the source (HeatFunctions).

    View source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.