-
-
Save ozelfatih/0102b13de116527104a9c370c76dcf0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function drawPieSlice(ctx,centerX, centerY, radius, startAngle, endAngle, color ){ | |
ctx.fillStyle = color; | |
ctx.beginPath(); | |
ctx.moveTo(centerX,centerY); | |
ctx.arc(centerX, centerY, radius, startAngle, endAngle); | |
ctx.closePath(); | |
ctx.fill(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment