-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDistance.mc
30 lines (24 loc) · 823 Bytes
/
Distance.mc
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
27
28
29
30
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.BluetoothLowEnergy as Bt;
class Distance extends Ui.Drawable {
hidden var x, y;
function initialize(params) {
Drawable.initialize(params);
x = params.get(:x);
y = params.get(:y);
}
function draw(dc) {
dc.fillPolygon([[x-5, y], [x, y+9], [x+5, y]]);
dc.fillCircle(x, y, 5);
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_TRANSPARENT);
dc.fillCircle(x, y, 2);
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
dc.fillPolygon([[x+5, y + 3], [x + 8, y+9], [x+11, y + 3]]);
dc.fillCircle(x + 8, y + 2, 3);
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_TRANSPARENT);
dc.fillCircle(x + 8, y + 2, 1);
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
dc.drawLine(x, y+9, x + 8, y + 9);
}
}