
Koło
Koło rysujemy podobnie jak okrąg, ale używamy polecenia fill().
Listing
var cv = document.getElementById("canvas");
var ctx = cv.getContext("2d");
ctx.beginPath();
var x = 150;
var y= 150;
var radius= 100;
var startAngle = 2*Math.PI;
var endAngle = 0;
var counterClockwise = false;
ctx.arc(x, y, radius, startAngle, endAngle, counterClockwise);
ctx.fillStyle = "#00aaff";
ctx.fill();
