Promotic
WikipediaLinkedInYoutubeTwitterFacebook

textAlign - property of the CanvasCtx object

Description:
Horizontal alignment of the text.
Syntax:
String textAlign
Values:
start (default) - The text starts at the specified position
end - The text ends at the specified position
center - The center of the text is placed at the specified position
left - The text starts at the specified position
right - The text ends at the specified position
Note:
Property access for read and write. This property is also functional in Web panels.
See also:
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.textAlign = "center";

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

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice