|
@@ -119,7 +119,7 @@ export class SGraphClockItem extends SGraphItem {
|
|
|
|
|
|
if (this.radius >= 40) {
|
|
|
// 如果半度大于40显示分钟刻度
|
|
|
- painter.rotate((6 * Math.PI) / 180);
|
|
|
+ painter.rotate(6);
|
|
|
for (let j = 1; j <= 4; j++) {
|
|
|
// 分钟刻度
|
|
|
painter.pen.lineWidth = strokeWidth;
|
|
@@ -129,10 +129,10 @@ export class SGraphClockItem extends SGraphItem {
|
|
|
0,
|
|
|
-this.radius + scaleLength
|
|
|
);
|
|
|
- painter.rotate((6 * Math.PI) / 180);
|
|
|
+ painter.rotate(6);
|
|
|
}
|
|
|
} else {
|
|
|
- painter.rotate((30 * Math.PI) / 180);
|
|
|
+ painter.rotate(30);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -157,9 +157,7 @@ export class SGraphClockItem extends SGraphItem {
|
|
|
painter.pen.lineCapStyle = SLineCapStyle.Round;
|
|
|
painter.pen.lineWidth = Math.max(this.radius / 30.0, 4.0);
|
|
|
painter.rotate(
|
|
|
- ((hour * 30.0 + (minute * 30.0) / 60 + (second * 30.0) / 3600) *
|
|
|
- Math.PI) /
|
|
|
- 180
|
|
|
+ hour * 30.0 + (minute * 30.0) / 60 + (second * 30.0) / 3600
|
|
|
);
|
|
|
painter.drawLine(0, this.radius / 10.0, 0, -this.radius / 2.0);
|
|
|
painter.restore();
|
|
@@ -180,7 +178,7 @@ export class SGraphClockItem extends SGraphItem {
|
|
|
painter.save();
|
|
|
painter.pen.lineCapStyle = SLineCapStyle.Round;
|
|
|
painter.pen.lineWidth = Math.max(this.radius / 40.0, 4.0);
|
|
|
- painter.rotate(((minute * 6 + (second * 6) / 60.0) * Math.PI) / 180);
|
|
|
+ painter.rotate(minute * 6 + (second * 6) / 60.0);
|
|
|
painter.drawLine(0, this.radius / 10.0, 0, (-this.radius * 2.0) / 3.0);
|
|
|
painter.restore();
|
|
|
} // Function drawMinute()
|
|
@@ -196,7 +194,7 @@ export class SGraphClockItem extends SGraphItem {
|
|
|
painter.pen.lineCapStyle = SLineCapStyle.Round;
|
|
|
painter.pen.lineWidth = Math.max(this.radius / 100.0, 3.0);
|
|
|
painter.pen.color = SColor.Red;
|
|
|
- painter.rotate((second * 6 * Math.PI) / 180);
|
|
|
+ painter.rotate(second * 6);
|
|
|
painter.drawLine(
|
|
|
0,
|
|
|
this.radius / 5.0,
|