textBaseline - property of the CanvasCtx object
Vertical alignment of the text.
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
Property access for read and write
This property is also functional in Web panels
variable represents the drawing canvas (CanvasCtx
). The setup is done on the "Draw
" tab at the beginning of the script of drawing event onDraw
ctx.textBaseline = "middle";