November 2011
Intermediate to advanced
348 pages
7h 2m
English
Almost all applications require some sort of text to effectively communicate something to the user. This recipe will show you how to draw a simple text string with an optimistic welcoming.

Follow these steps to write text on the canvas:
window.onload = function(){
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
context.font = "40pt Calibri";
context.fillStyle = "black";// align text horizontally center context.textAlign = "center"; // align text vertically center context.textBaseline ...
Read now
Unlock full access