Skip to content

GridFillStyle

Namespace: ThinkGeo.Core.Styling

How a GridSource fills its cells - on the GPU map (AddGridFill, ThinkGeo.Gpu's extension of the style) and on the classic map's grid overlay alike. Every property has a working default, so AddGridFill(grid) alone draws.

public sealed class GridFillStyle

Inheritance object → GridFillStyle

Properties

ColorStops

The colours, by value in the data's own units: (-10, blue), (0, white), (35, red). The stops fix the range - a value below the first takes the first colour, above the last the last - so a colour means the same value in every update of the source and in every map. Null colours each update over its own smallest to largest value with a built-in blue-to-red ramp. A cell with no data (NaN) is not drawn.

public IReadOnlyList<ColorStop> ColorStops { get; set; }

Property Value

IReadOnlyList<ColorStop>

RampMode

How a value between two stops is coloured: ColorRampMode.Gradient, the default, blends them; ColorRampMode.Classes holds each stop's colour up to the next stop, for data that is a category or a band (cloud cover in tenths, a land-use code).

public ColorRampMode RampMode { get; set; }

Property Value

ColorRampMode

Resampling

How the grid is sampled between cell centres: RasterResampling.Linear, the default, blends neighbouring cells into a smooth surface; RasterResampling.Nearest draws each cell as a solid block.

public RasterResampling Resampling { get; set; }

Property Value

RasterResampling

Opacity

Whole-fill opacity, 0 to 1.

public float Opacity { get; set; }

Property Value

float

Constructors

GridFillStyle()

public GridFillStyle()

Methods

GetColor(double, double, double)

The colour a value takes: from GridFillStyle.ColorStops, held at each stop when GridFillStyle.RampMode is ColorRampMode.Classes; without stops, from the built-in blue-to-red ramp over .., the data's own range. What every renderer of the fill colours a cell with - and what a legend drawn beside it reads. GridFillStyle.Opacity is not applied.

public GeoColor GetColor(double value, double dataMinimum, double dataMaximum)

Parameters

value double
The cell's value, in the data's own units.

dataMinimum double
The smallest value in the data; used only without stops.

dataMaximum double
The largest value in the data; used only without stops.

Returns

GeoColor

A(float, double, double)

internal GeoColor A(float , double , double )

Parameters

`` float

`` double

`` double

Returns

GeoColor

A(float)

internal static GeoColor A(float )

Parameters

`` float

Returns

GeoColor

A(GeoColor, GeoColor, float)

internal static GeoColor A(GeoColor , GeoColor , float )

Parameters

`` GeoColor

`` GeoColor

`` float

Returns

GeoColor