forked from espruino/BangleApps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsphclock.background.js
More file actions
27 lines (21 loc) · 809 Bytes
/
Copy pathsphclock.background.js
File metadata and controls
27 lines (21 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
exports.drawBannerLeft = function (y, height, width) {
let x = 0;
let orig_y = y;
g.setColor("#F00");
let half_height = Math.round(height / 2);
g.fillPoly([x, y, x += width, y, x -= half_height, y += half_height, x += half_height, y += half_height, x -= width, y]);
x = 0;
y = orig_y + 2;
g.setColor("#FFF");
g.drawPoly([x, y, x += width - 5, y, x -= half_height - 2, y += half_height - 2, x += half_height - 2, y += half_height - 2, x -= width - 5, y]);
y = orig_y;
g.setColor("#000");
g.drawLine(0, y += 2 * half_height, width - 1, y);
g.drawLine(x = width - half_height, y -= half_height, x += half_height, y -= half_height,);
}
exports.drawBackground = function () {
g.setColor("#000");
g.fillRect(0, 0, 175, 175);
g.setColor("#FFF");
g.fillRect(3, 3, 172, 172);
}