iDevOS CALC "EALIGN" Command

Get the alignment of an entity.

Description

CALC( y, name, "EALIGN" );   // y = alignment("name")

This command returns y, as a number, the alignment of the entity called name. The alignment values are:

  • 0 = Top Left
  • 1 = Top Centre
  • 2 = Top Right
  • 3 = Centre Left
  • 4 = Centre Centre
  • 5 = Centre Right
  • 6 = Bottom Left
  • 7 = Bottom Centre
  • 8 = Bottom Right

Parameters

y
Calculation result.
Parameter type: entity name of a numeric variable (eg U8, S32, FLT3 etc).
name
Entity Name.
Parameter type: immediate entity name.
"EALIGN"
CALC command operator.
Parameter type: immediate string.

Examples

Example 1

VAR(align,  0,  U8);  // Result
TEXT(txt1, "Hello", stTxt);  // Text with curRel=CC

CALC(align, txt1, "EALIGN"); // align = 4 (centre-centre)
LOAD(stTxt.curRel, BL);
CALC(align, txt1, "EALIGN"); // align = 6 (bottom-left)