Add outer circle for points from axis
This commit is contained in:
parent
ff07951c88
commit
a478df9817
2 changed files with 16 additions and 0 deletions
|
@ -85,6 +85,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
|
||||
private Paint paintInnerRect;
|
||||
|
||||
private Paint paintGridOuterCircle;
|
||||
private Paint paintGridCircle;
|
||||
|
||||
private Paint paintTextIcon;
|
||||
|
@ -146,6 +147,11 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
paintGridCircle = new Paint();
|
||||
paintGridCircle.setStyle(Style.FILL_AND_STROKE);
|
||||
paintGridCircle.setAntiAlias(true);
|
||||
paintGridOuterCircle = new Paint();
|
||||
paintGridOuterCircle.setStyle(Style.FILL_AND_STROKE);
|
||||
paintGridOuterCircle.setAntiAlias(true);
|
||||
paintGridOuterCircle.setColor(Color.WHITE);
|
||||
paintGridOuterCircle.setAlpha(204);
|
||||
|
||||
paintIcon = new Paint();
|
||||
pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_white_shield_small);
|
||||
|
@ -400,6 +406,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
trackChartPoints.setSegmentColor(color);
|
||||
}
|
||||
paintGridCircle.setColor(color);
|
||||
paintGridCircle.setAlpha(255);
|
||||
QuadRect latLonBounds = tileBox.getLatLonBounds();
|
||||
List<WptPt> xAxisPoints = trackChartPoints.getXAxisPoints();
|
||||
float r = 3 * tileBox.getDensity();
|
||||
|
@ -411,6 +418,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
&& axisPoint.getLongitude() <= latLonBounds.right) {
|
||||
float x = tileBox.getPixXFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
|
||||
float y = tileBox.getPixYFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
|
||||
canvas.drawCircle(x, y, r + 2 * (float) Math.ceil(tileBox.getDensity()), paintGridOuterCircle);
|
||||
canvas.drawCircle(x, y, r + (float) Math.ceil(tileBox.getDensity()), paintGridCircle);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ public class RouteLayer extends OsmandMapLayer {
|
|||
|
||||
private Paint paintIcon;
|
||||
private Paint paintIconAction;
|
||||
private Paint paintGridOuterCircle;
|
||||
private Paint paintGridCircle;
|
||||
|
||||
private Paint paintIconSelected;
|
||||
|
@ -99,6 +100,12 @@ public class RouteLayer extends OsmandMapLayer {
|
|||
paintGridCircle.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
paintGridCircle.setAntiAlias(true);
|
||||
paintGridCircle.setColor(attrs.defaultColor);
|
||||
paintGridCircle.setAlpha(255);
|
||||
paintGridOuterCircle = new Paint();
|
||||
paintGridOuterCircle.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
paintGridOuterCircle.setAntiAlias(true);
|
||||
paintGridOuterCircle.setColor(Color.WHITE);
|
||||
paintGridOuterCircle.setAlpha(204);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -179,6 +186,7 @@ public class RouteLayer extends OsmandMapLayer {
|
|||
&& axisPoint.getLongitude() <= latLonBounds.right) {
|
||||
float x = tileBox.getPixXFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
|
||||
float y = tileBox.getPixYFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
|
||||
canvas.drawCircle(x, y, r + 2 * (float) Math.ceil(tileBox.getDensity()), paintGridOuterCircle);
|
||||
canvas.drawCircle(x, y, r + (float) Math.ceil(tileBox.getDensity()), paintGridCircle);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue