From ce8823196034323f1613d87b52155543a9247f47 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 12 Aug 2018 09:42:19 -0300 Subject: Background behind ATB bar --- img/bg.kra | Bin 548436 -> 548440 bytes img/bg.kra~ | Bin 0 -> 548436 bytes index.js | 3 +++ 3 files changed, 3 insertions(+) create mode 100644 img/bg.kra~ diff --git a/img/bg.kra b/img/bg.kra index 24b56d1..c798aac 100644 Binary files a/img/bg.kra and b/img/bg.kra differ diff --git a/img/bg.kra~ b/img/bg.kra~ new file mode 100644 index 0000000..24b56d1 Binary files /dev/null and b/img/bg.kra~ differ diff --git a/index.js b/index.js index cbdd4fc..3e46f74 100644 --- a/index.js +++ b/index.js @@ -54,6 +54,9 @@ class ATBBar { ctx.clearRect(0, 0, this.canvas.width, this.canvas.height) ctx.save() + ctx.fillStyle = 'rgba(255, 255, 255, 0.2)' + ctx.fillRect(0, 0, this.canvas.width, this.canvas.height) + ctx.beginPath() ctx.rect(0, 0, Math.round(this.canvas.width * this.visualProgress), this.canvas.height) ctx.clip() -- cgit 1.3.0-6-gf8a5