strokeText to add Text to CanvasDrag the sliders to change the X, Y position of lineTo().
text: text string to display. x: Position from left edge of the canvas,starting point of the text y: Position from Top edge of the canvas, stating point of the text. maxWidth: Optional, Font is adjusted to match the width. var my_canvas=$('#my_canvas').get(0)
var gctx = my_canvas.getContext("2d");
gctx.font = '46px serif';
gctx.strokeText('plus2net.com', 100,100);
With strokeStyle
var my_canvas=$('#my_canvas').get(0)
var gctx = my_canvas.getContext("2d");
gctx.font = '46px serif';
gctx.strokeStyle= '#f54669';
gctx.strokeText('plus2net.com', 100,100);
This article is written by plus2net.com team.
|