20 lines
624 B
MonkeyC
20 lines
624 B
MonkeyC
import Toybox.Graphics;
|
|
import Toybox.Lang;
|
|
import Toybox.WatchUi;
|
|
|
|
class LineMark extends IMark {
|
|
|
|
var InnerRadius as Float = 0.9;
|
|
|
|
function initialize(options as IMark.MarkParams) {
|
|
IMark.initialize(options);
|
|
}
|
|
|
|
function drawMark(dc as Dc, x as Float, y as Float, length as Float) as Void {
|
|
var angle = Math.toRadians(Seconds * 6.0 - 90);
|
|
|
|
dc.setColor(Color, Color);
|
|
dc.drawLine(x + length * InnerRadius * Math.cos(angle), y + length * InnerRadius * Math.sin(angle),
|
|
x + length * Radius * Math.cos(angle), y + length * Radius * Math.sin(angle));
|
|
}
|
|
} |