Don't bias arrow's position

This commit is contained in:
cepprice 2021-03-21 21:57:59 +05:00
parent 170c70e42b
commit e058dad692
2 changed files with 0 additions and 9 deletions

View file

@ -89,13 +89,11 @@ public class GpxGeometryWay extends GeometryWay<GpxGeometryWayContext, GeometryW
protected int trackColor;
protected float trackWidth;
private float circleAngleOffset;
private float outerCircleRadius;
private float innerCircleRadius;
GeometryArrowsStyle(GpxGeometryWayContext context, int arrowColor, int trackColor, float trackWidth) {
this(context, null, arrowColor, trackColor, trackWidth);
circleAngleOffset = AndroidUtils.dpToPx(context.getCtx(), 1);
outerCircleRadius = AndroidUtils.dpToPx(context.getCtx(), 8);
innerCircleRadius = AndroidUtils.dpToPx(context.getCtx(), 7);
}
@ -146,10 +144,6 @@ public class GpxGeometryWay extends GeometryWay<GpxGeometryWayContext, GeometryW
return trackWidth;
}
public float getCircleAngleOffset() {
return circleAngleOffset;
}
public float getOuterCircleRadius() {
return outerCircleRadius;
}

View file

@ -59,9 +59,6 @@ public class GpxGeometryWayDrawer extends GeometryWayDrawer<GpxGeometryWayContex
}
private void drawCircle(Canvas canvas, GeometryArrowsStyle style) {
double rad = Math.toRadians(angle + 90);
float x = (float) (this.x - style.getCircleAngleOffset() * Math.cos(rad));
float y = (float) (this.y - style.getCircleAngleOffset() * Math.sin(rad));
Paint paint = style.getContext().getCirclePaint();
paint.setColor(GeometryArrowsStyle.OUTER_CIRCLE_COLOR);
canvas.drawCircle(x, y, style.getOuterCircleRadius(), paint);