- function Circle(ctx,x,y,r,fillStyle){
- // x = top corner X y = top corner Y
- // r = radius ctx = canvas context
- ctx.fillStyle = (typeof fillStyle === "undefined") ? "rgb(0,0,0)" : fillStyle;
- ctx.beginPath();
- ctx.arc(x+r,y+r,r,0,Math.PI*2,true);
- ctx.stroke();
- }
No comments:
Post a Comment