Skip to content

DrawingTextAlignment

Namespace: ThinkGeo.Core

Specifies how the individual lines of a multi-line text block are aligned horizontally relative to one another — i.e. text justification, similar to CSS text-align.

public enum DrawingTextAlignment

Inheritance object → ValueType → Enum → DrawingTextAlignment
Implements IComparable, IConvertible, IFormattable

Remarks:

This setting only affects multi-line text: it controls how each line is placed within the width of the widest line (the block's bounding box). It has no visible effect on single-line text, because a single line has no other lines to align against; that is by design, not a limitation.

It does NOT anchor the block to the drawing point — the block stays centered on the point (or wherever the label placement puts it) regardless of this value. To anchor text to a specific point or corner, position it through the drawing coordinate instead: the coordinate is the text's center, so offset it by half of MeasureText's width/height, or — when labeling features — use the label style's TextPlacement.

Fields

Name Value Description
Default 0 The default alignment. Behaves the same as — every line is centered
within the block.
Left 1 Left-justified: the left edges of all lines are flush.
Center 2 Centered: every line is centered within the block.
Right 3 Right-justified: the right edges of all lines are flush.