|
@@ -267,18 +267,7 @@ export default class Draw {
|
|
|
|
|
|
const ctx = this.context;
|
|
const ctx = this.context;
|
|
ctx.save();
|
|
ctx.save();
|
|
- help.setVectorStyle(ctx, null, "RoadEdge");
|
|
|
|
-
|
|
|
|
- //曲线
|
|
|
|
- ctx.moveTo(start.x, start.y);
|
|
|
|
- ctx.quadraticCurveTo(pt.x, pt.y, end.x, end.y);
|
|
|
|
- ctx.stroke();
|
|
|
|
- ctx.restore();
|
|
|
|
-
|
|
|
|
- ctx.save();
|
|
|
|
ctx.beginPath();
|
|
ctx.beginPath();
|
|
- help.setVectorStyle(ctx, vector);
|
|
|
|
-
|
|
|
|
ctx.arc(
|
|
ctx.arc(
|
|
pt.x,
|
|
pt.x,
|
|
pt.y,
|
|
pt.y,
|
|
@@ -290,6 +279,16 @@ export default class Draw {
|
|
ctx.stroke();
|
|
ctx.stroke();
|
|
ctx.fill();
|
|
ctx.fill();
|
|
ctx.restore();
|
|
ctx.restore();
|
|
|
|
+
|
|
|
|
+ ctx.save();
|
|
|
|
+ ctx.beginPath();
|
|
|
|
+ help.setVectorStyle(ctx, null, "RoadEdge");
|
|
|
|
+ //曲线
|
|
|
|
+ ctx.moveTo(start.x, start.y);
|
|
|
|
+ ctx.quadraticCurveTo(pt.x, pt.y, end.x, end.y);
|
|
|
|
+ ctx.stroke();
|
|
|
|
+ ctx.restore();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
drawCurveRoad(vector) {
|
|
drawCurveRoad(vector) {
|