Vertical Alignment of a Character String

When a character string is to be displayed vertically, it can be positioned in one of the four ways illustrated in the following figure. The vertical options all can be set directly using the lVertical option of GpiSetTextAlignment.

Vertical Positioning of Text Strings

The following flags are used to specify types of vertical alignment:

Vertical Alignment Values

┌────────────────────────┬────────────────────────────────────┐
│Identifier              │Alignment                           │
├────────────────────────┼────────────────────────────────────┤
│TA_TOP                  │On the top edge of the topmost      │
│                        │character in the string             │
├────────────────────────┼────────────────────────────────────┤
│TA_HALF                 │On the arithmetic mean of the       │
│                        │topmost and bottommost characters in│
│                        │the string                          │
├────────────────────────┼────────────────────────────────────┤
│TA_BASE                 │On the baseline of the bottommost   │
│                        │character in the string             │
├────────────────────────┼────────────────────────────────────┤
│TA_BOTTOM               │On the bottom edge of the bottommost│
│                        │character in the string             │
└────────────────────────┴────────────────────────────────────┘

There are two sets of default values for the lVertical option. They are provided for compatibility and map into the vertical alignment values described above.


[Back: Horizontal Alignment of a Character String]
[Next: Character Extra and Break Extra]