18 lines
501 B
MonkeyC
18 lines
501 B
MonkeyC
import Toybox.Graphics;
|
|
import Toybox.Lang;
|
|
|
|
class SimpleHand extends IHand {
|
|
|
|
function initialize(options as IHand.HandParams) {
|
|
IHand.initialize(options);
|
|
}
|
|
|
|
function drawHand(dc as Dc, start as Point2D, length as Float) as Void {
|
|
var angle = Math.toRadians(getAngle(null) - 90);
|
|
dc.setColor(Color, Color);
|
|
dc.drawLine(
|
|
start[0], start[1],
|
|
start[0] + length * Math.cos(angle), start[1] + length * Math.sin(angle)
|
|
);
|
|
}
|
|
} |