Table of Contents

Class HeatmapExtensions

Namespace
OFT.Rendering.Heatmap
Assembly
OFT.Rendering.dll

Access to the heatmap color palettes of HeatmapTypes, loaded from the palette images embedded in this assembly.

public static class HeatmapExtensions
Inheritance
object
HeatmapExtensions

Methods

GetColor(HeatmapTypes, int)

Gets the palette color at the given position.

public static Color GetColor(HeatmapTypes type, int percent)

Parameters

type HeatmapTypes

The palette.

percent int

Position in the palette from 0 to 100; values outside the range are clamped to the first or the last color.

Returns

Color

The palette color; System.Drawing.Color.Transparent when percent is 0 or the palette is unknown.

Initialize()

Loads the palette images of all HeatmapTypes values and their colors. Thread-safe; does nothing once the palettes are loaded. Called by the static constructor, so explicit calls are not required; a missing or undecodable palette image therefore fails the first use of the class with a System.TypeInitializationException.

public static void Initialize()

IsCombinedHeatmap(HeatmapTypes)

Checks if the heatmap is a combination of two heatmaps for ask and bids separately

public static bool IsCombinedHeatmap(this HeatmapTypes heatmapTypes)

Parameters

heatmapTypes HeatmapTypes

Returns

bool

TryGetImage(HeatmapTypes)

Gets the palette image of type: a horizontal gradient from the lowest to the highest volume color. The bitmap is shared and must not be disposed or modified.

public static SKBitmap? TryGetImage(this HeatmapTypes type)

Parameters

type HeatmapTypes

The palette.

Returns

SKBitmap

The palette image, or null when there is no image for type.