Game Development Reference
In-Depth Information
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.rect(10, 10, 50, 50);
ctx.rect(75, 50, 50, 50);
ctx.moveTo(180, 100);
ctx.arc(180, 100, 30, 1, 3, true);
ctx.moveTo(225, 40);
ctx.arc(225, 40, 20, 0, Math.PI * 2, false);
ctx.stroke();
Arcs (including circles) are drawn from their center and not from some point on their outline.
Search WWH ::




Custom Search