131
rated 0 times
[
137]
[
6]
/ answers: 1 / hits: 59986
/ 13 Years ago, sun, december 18, 2011, 12:00:00
I imagine the solution to this is very simple, and apologize in advance if this is painfully obvious, but I can't seem to figure out how to set two different fillStyles for two different arcs ...I just wanna be able to draw different color circles. Below I have how I would normally do it with other shapes/drawing methods in canvas, but for some reason with arcs it sets both arcs to the last fillStyle.
ctx.fillStyle = #c82124; //red
ctx.arc(15,15,15,0,Math.PI*2,true);
ctx.fill();
ctx.fillStyle = #3370d4; //blue
ctx.arc(580,15,15,0,Math.PI*2,true);
ctx.fill();
More From » colors