22 lines
544 B
MonkeyC
22 lines
544 B
MonkeyC
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));
|
|
}
|
|
} |