Halaman

Urutan dalam menggambar lingkaran - canvas javascript

Begini urutannya

ctx.clearRect(0,0, canvas.width, canvas.height);

ctx.strokeStyle = '#000000'; // Warna 

ctx.lineWidth = 1; // Ketebalan garis 5px

ctx.lineJoin = "round";

ctx.beginPath();

ctx.arc(xo, yo, rr, sdtRad1, sdtRad2);

ctx.closePath();

ctx.fillStyle = '#ffff00';

ctx.fill();

ctx.stroke();


beginpath dan closepath kemudian baru fill.