drawText
The drawText function is used for drawing text on a canvas.
Prototype
prototype
drawText(context: CanvasRenderingContext2D, text: string, position: Point, options?: DrawTextOptions)
Parameters
context- Type:
CanvasRenderingContext2D - The canvas context.
- Type:
text- Type:
string - The text to draw.
- Type:
position- Type:
Point - The position of the text on the canvas.
- Type:
options- Type:
DrawTextOptions - Default value:
undefined - The options for drawing the text.
- Type:
Return
void
Default options
fillColor:'transparent'align:'left'fontName:'Arial'fontSize:'8px'strokeColor:'transparent'strokeSize:0