initial commit
This commit is contained in:
18
source/Hands/SimpleHand.mc
Normal file
18
source/Hands/SimpleHand.mc
Normal file
@ -0,0 +1,18 @@
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user