diff options
Diffstat (limited to 'src/ui/canvas.js')
-rw-r--r-- | src/ui/canvas.js | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/ui/canvas.js b/src/ui/canvas.js deleted file mode 100644 index b04b966..0000000 --- a/src/ui/canvas.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -export function draw(canvas, size, fn) { - const ctx = canvas.getContext("2d"); - const scale = canvas.clientWidth/size; - ctx.save(); - ctx.scale(scale, scale); - ctx.clearRect(0, 0, size, size); - fn(ctx); - ctx.restore(); -} |