Created
September 26, 2021 20:33
-
-
Save yesasha/0aa5c2d6e054f84effa838a8394d5cb4 to your computer and use it in GitHub Desktop.
Not a library for canvas. Just copy the needed functions to your project.
This file contains hidden or 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 circle (ctx, x, y, r) { | |
| ctx.beginPath(); | |
| ctx.arc(x, y, r, 0, 2 * Math.PI, false); | |
| } | |
| function strokeCircle (ctx, x, y, r) { | |
| ctx.beginPath(); | |
| ctx.arc(x, y, r, 0, 2 * Math.PI, false); | |
| ctx.stroke(); | |
| } | |
| function fillCircle (ctx, x, y, r) { | |
| ctx.beginPath(); | |
| ctx.arc(x, y, r, 0, 2 * Math.PI, false); | |
| ctx.fill(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment