textAlign : Align Text on Canvas
left: Text is left aligned.right: Text is right aligned. center: Text is centered . start: Aligned to start. Text is left aligned for left-to-right locales, and right aligned for right-to-left locales end: Aligned to end. Text is right alinged for left-to-right locales, and left alinged for right-to-left locales. var my_canvas=$('#my_canvas').get(0) var gctx = my_canvas.getContext("2d"); gctx.textAlign='right'; gctx.fillText('plus2net.com',200,100)
This article is written by plus2net.com team.
|