SymbolPaint¶
Namespace: ThinkGeo.Core.Styling
public struct SymbolPaint
Inheritance object → ValueType → SymbolPaint
Properties¶
TextColor¶
public GeoColor TextColor { get; }
Property Value¶
HaloColor¶
public GeoColor HaloColor { get; }
Property Value¶
HaloWidth¶
public float HaloWidth { get; }
Property Value¶
HaloBlur¶
public float HaloBlur { get; }
Property Value¶
Opacity¶
text-opacity. Applies to the glyph and halo pixels only.
public float Opacity { get; }
Property Value¶
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¶
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¶
IconTranslateY¶
icon-translate y in pixels; positive is down.
public float IconTranslateY { get; }
Property Value¶
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¶
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