initial commit
This commit is contained in:
22
source/Hands/SimpleHands.mc
Normal file
22
source/Hands/SimpleHands.mc
Normal file
@ -0,0 +1,22 @@
|
||||
import Toybox.Graphics;
|
||||
import Toybox.Lang;
|
||||
|
||||
class SimpleHands extends IHands {
|
||||
|
||||
function initialize(options) {
|
||||
IHands.initialize(options);
|
||||
}
|
||||
|
||||
function drawHand(
|
||||
dc as Dc,
|
||||
x as Float,
|
||||
y as Float,
|
||||
angle as Float,
|
||||
length as Float,
|
||||
handType as IHands.HandType) {
|
||||
var rad = (angle - 90) * Math.PI / 180.0;
|
||||
|
||||
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_WHITE);
|
||||
dc.drawLine(x, y, x + length * Math.cos(rad), y + length * Math.sin(rad));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user