Ola
I got it to work!
I used fill method,
Code:
ctx.fillStyle = "green";
ctx.beginPath();
ctx.moveTo(center.x, center.y);
ctx.lineTo(x2, y2);
ctx.arc(200, 200, radius, d2r(z1 + 90), d2r(v1 + 90), false);
ctx.moveTo(center.x, center.y);
ctx.lineTo(x1, y1);
ctx.closePath();
ctx.fill();
and than repeated the same code, but arc direction in opposite direction:
Code:
ctx.fillStyle = "blue";
ctx.beginPath();
ctx.moveTo(center.x, center.y);
ctx.lineTo(x2, y2);
ctx.arc(200, 200, radius, d2r(z1 + 90), d2r(v1 + 90), true);
ctx.moveTo(center.x, center.y);
ctx.lineTo(x1, y1);
ctx.closePath();
ctx.fill();
Thank you.
Bookmarks