HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

SFT_PICALIGN Constants

Alignment values for the align and valign fields on SFT_PICTURE and SFT_TEXT. align controls horizontal placement, valign controls vertical placement.

/* Horizontal (align) */
#define SFT_PICALIGN_CENTER     0
#define SFT_PICALIGN_LEFT       1
#define SFT_PICALIGN_RIGHT      2
#define SFT_PICALIGN_FLUSH      3

/* Vertical (valign) */
#define SFT_PICALIGN_VCENTER    0
#define SFT_PICALIGN_TOP        1
#define SFT_PICALIGN_BOTTOM     2

Horizontal alignment (align)

SFT_PICALIGN_CENTER (0)Center the picture / text horizontally within its slot. Default.
SFT_PICALIGN_LEFT (1)Left-align.
SFT_PICALIGN_RIGHT (2)Right-align.
SFT_PICALIGN_FLUSH (3)Flush / justify (text only - meaningful on multi-line SFT_TEXT content).

Vertical alignment (valign)

SFT_PICALIGN_VCENTER (0)Center vertically within the slot. Default.
SFT_PICALIGN_TOP (1)Align to the top of the slot.
SFT_PICALIGN_BOTTOM (2)Align to the bottom of the slot.

Note: align and valign use overlapping numeric values (CENTER = 0 in both axes, etc.). Always use the value-name appropriate to the axis - the _VCENTER / _TOP / _BOTTOM names for valign and the _CENTER / _LEFT / _RIGHT / _FLUSH names for align - to keep code readable.

For SFT_TEXT, the align and valign settings drive the corresponding DT_LEFT / DT_CENTER / DT_RIGHT / DT_TOP / DT_VCENTER / DT_BOTTOM bits during DrawText automatically; do not set those bits in SFT_TEXT.flag.

See Also SftPicture2 | SFT_PICTURE | SFT_TEXT


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.