Promotic

textBaseline - property of the CanvasCtx object

Description:
Vertical alignment of the text.
Syntax:
String textBaseline
Values:
alphabetic (default) - The lower edge of the text (A, a ..) is touching the imagined line
top - The upper edge of the text (A, B ..) is under the imagined line
hanging - The upper edge of the text (a, c ..) is under the imagined line
middle - The imagined line goes through the center of the text block
ideographic - Ideographic text display.
bottom - The lower edge of the text (g, j, y ...) is touching the imagined line
Note:
Property access for read and write.
 
This property is also functional in Web panels.
See also:
- CanvasCtx.textAlign (property)
Example:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on the "Draw" tab at the beginning of the script of drawing event onDraw as follows:
 
var ctx = pEvent.GetCtx(1);
JavaScriptSelect and copy to clipboard

ctx.textBaseline = "middle";

History:
Pm8.02.06: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.