Class TextInstruction
A text label rendering instruction. Anchor position is the feature's representative point, resolved by FeatureReference.
public sealed class TextInstruction : DrawingInstruction
- Inheritance
-
TextInstruction
- Inherited Members
Properties
AreaPlacement
Where the anchor goes on a surface (S-100 Part 9 AreaPlacement):
a representative point inside the area, kept in the visible part of the
area as the view moves (VisibleParts,
the default) or fixed (Geographic).
Ignored for points, curves and an explicit CoordinateOverride.
public AreaPlacementMode AreaPlacement { get; init; }
Property Value
BackgroundColor
Optional S-100 colour token for the text background (S-100 Part 9
§11.4 <background>). Renderers typically draw this as a
translucent box or halo behind the glyphs.
public string? BackgroundColor { get; init; }
Property Value
BackgroundTransparency
Optional opacity for the background colour, in the range 0.0 (fully
opaque) to 1.0 (fully transparent), matching the S-100 Part 9
transparency attribute on <background>.
public double? BackgroundTransparency { get; init; }
Property Value
CoordinateOverride
Optional explicit (latitude, longitude) anchor that overrides the
feature's geometry-derived anchor (S-100 Part 9 §11.5 AugmentedPoint
in GeographicCRS mode).
public GeoPosition? CoordinateOverride { get; init; }
Property Value
FontColor
S-100 colour token (e.g. CHBLK) for the text foreground.
public string FontColor { get; init; }
Property Value
FontProportion
Font proportion (S-100 Part 9 FontCharacteristics.proportion).
Defaults to Proportional.
public TextFontProportion FontProportion { get; init; }
Property Value
FontReference
Optional reference (by name) to a font in the portrayal catalogue.
public string? FontReference { get; init; }
Property Value
FontSize
Font size (points).
public double FontSize { get; init; }
Property Value
FontTransparency
Optional opacity for the foreground colour, in the range 0.0 (fully
opaque) to 1.0 (fully transparent), matching the S-100 Part 9
transparency attribute on <foreground>.
public double? FontTransparency { get; init; }
Property Value
FontWeight
Font weight (S-100 Part 9 FontCharacteristics.weight). Defaults to
Medium, the renderer's regular face.
public TextFontWeight FontWeight { get; init; }
Property Value
HaloColor
Optional S-100 colour token for a halo stroked around the glyphs, so the label reads over busy chart content. Not an S-100 Part 9 text attribute: it is used by portrayals SoundCharts defines itself (S-104 water level). null draws no halo.
public string? HaloColor { get; init; }
Property Value
HaloWidth
Width of the HaloColor stroke in millimetres on the nominal display surface. Ignored when HaloColor is null.
public double HaloWidth { get; init; }
Property Value
HorizontalAlignment
Horizontal alignment of the text relative to its anchor point
(S-100 Part 9 §11.4: Start | Center | End).
public TextHorizontalAlignment HorizontalAlignment { get; init; }
Property Value
LineEndOffset
Optional line-placement end offset; see LineStartOffset.
public double? LineEndOffset { get; init; }
Property Value
LineOffsetMode
Mode used to interpret LineStartOffset / LineEndOffset.
public LinePlacementMode? LineOffsetMode { get; init; }
Property Value
LinePlacementPosition
Optional fractional position (0.0–1.0) along the feature's curve geometry at which to anchor the text. Used for line-placed labels.
public double? LinePlacementPosition { get; init; }
Property Value
LineStartOffset
Optional line-placement start offset (S-100 Part 9 §11.4.2). Interpretation
depends on LineOffsetMode: a fraction of the curve length when
Relative, millimetres when Absolute.
public double? LineStartOffset { get; init; }
Property Value
OffsetX
Optional X offset (millimetres on the nominal display surface) from the anchor.
public double? OffsetX { get; init; }
Property Value
OffsetY
Optional Y offset (millimetres on the nominal display surface) from the anchor.
public double? OffsetY { get; init; }
Property Value
Rotation
Text rotation in degrees (clockwise from north). Null means upright.
public double? Rotation { get; init; }
Property Value
Text
The literal text to render.
public required string Text { get; init; }
Property Value
VerticalAlignment
Vertical alignment of the text relative to its anchor point
(S-100 Part 9 §11.4: Top | Center | Bottom).
public TextVerticalAlignment VerticalAlignment { get; init; }