Skip to content

SymbolPaint

Namespace: ThinkGeo.Core.Styling

public struct SymbolPaint

Inheritance object → ValueType → SymbolPaint

Properties

TextColor

public GeoColor TextColor { get; }

Property Value

GeoColor

HaloColor

public GeoColor HaloColor { get; }

Property Value

GeoColor

HaloWidth

public float HaloWidth { get; }

Property Value

float

HaloBlur

public float HaloBlur { get; }

Property Value

float

Opacity

text-opacity. Applies to the glyph and halo pixels only.

public float Opacity { get; }

Property Value

float

IconOpacity

icon-opacity. The spec keeps the two channels independent: streets-v12 poi-label fades ICONS by sizerank steps while the text stays opaque, and country-label carries an icon-opacity expression that reaches 0 — feeding it to the text hid the whole layer.

public float IconOpacity { get; }

Property Value

float

IconTranslateX

icon-translate x in pixels. The icon moves, its text does not, and so does the icon's collision box - the reference places the translated icon.

public float IconTranslateX { get; }

Property Value

float

IconTranslateY

icon-translate y in pixels; positive is down.

public float IconTranslateY { get; }

Property Value

float

IconTranslateAnchor

icon-translate-anchor: what the icon's translate is measured against - the map (the default), turning with it, or the screen, staying put as the map rotates.

public StyleAnchor IconTranslateAnchor { get; }

Property Value

StyleAnchor

Constructors

SymbolPaint(GeoColor, GeoColor, float, float, float, Nullable<float>, float, float, StyleAnchor)

Creates a symbol paint; everything after the text colour has the style spec's default.

SymbolPaint(GeoColor textColor, GeoColor haloColor, float haloWidth, float haloBlur, float opacity, Nullable<float> iconOpacity, float iconTranslateX, float iconTranslateY, StyleAnchor iconTranslateAnchor)

Parameters

textColor GeoColor
text-color.

haloColor GeoColor
text-halo-color; null for no halo.

haloWidth float
text-halo-width, in pixels.

haloBlur float
text-halo-blur, in pixels.

opacity float
text-opacity.

iconOpacity Nullable<float>
icon-opacity; null follows .

iconTranslateX float
icon-translate x, in pixels; positive moves the icon right.

iconTranslateY float
icon-translate y, in pixels; positive moves the icon down.

iconTranslateAnchor StyleAnchor
icon-translate-anchor: the map (the default) or the screen.

Methods

FromTextStyle(TextStyle)

The colours of a classic TextStyle: the text brush, and the halo pen as text-halo. A halo pen strokes the glyph outline centred on it, so half its width shows outside the glyph - and that outside distance is what text-halo-width measures. A transparent pen is no halo.

SymbolPaint FromTextStyle(TextStyle style)

Parameters

style TextStyle

Returns

SymbolPaint