Split the shadow for text and circles

This commit is contained in:
Alexander Sytnyk 2017-06-14 15:06:16 +03:00
parent 86c4722c58
commit b2c3ba200a

View file

@ -69,7 +69,9 @@ public class RulerControlLayer extends OsmandMapLayer {
circleAttrs = new RenderingLineAttributes("rulerCircle"); circleAttrs = new RenderingLineAttributes("rulerCircle");
circleAttrs.paint.setStrokeWidth(2); circleAttrs.paint.setStrokeWidth(2);
circleAttrs.paint2.setTextSize(TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density); circleAttrs.paint2.setTextSize(TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density);
circleAttrs.shadowPaint.setTextSize(TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density); circleAttrs.paint3.setColor(Color.WHITE);
circleAttrs.paint3.setStrokeWidth(6);
circleAttrs.paint3.setTextSize(TEXT_SIZE * mapActivity.getResources().getDisplayMetrics().density);
circleAttrs.shadowPaint.setStrokeWidth(6); circleAttrs.shadowPaint.setStrokeWidth(6);
circleAttrs.shadowPaint.setColor(Color.WHITE); circleAttrs.shadowPaint.setColor(Color.WHITE);
} }
@ -216,9 +218,9 @@ public class RulerControlLayer extends OsmandMapLayer {
canvas.rotate(-tb.getRotate(), center.x, center.y); canvas.rotate(-tb.getRotate(), center.x, center.y);
canvas.drawCircle(center.x, center.y, radius * circleNumber, circleAttrs.shadowPaint); canvas.drawCircle(center.x, center.y, radius * circleNumber, circleAttrs.shadowPaint);
canvas.drawCircle(center.x, center.y, radius * circleNumber, circleAttrs.paint); canvas.drawCircle(center.x, center.y, radius * circleNumber, circleAttrs.paint);
canvas.drawText(text, x1, y1, circleAttrs.shadowPaint); canvas.drawText(text, x1, y1, circleAttrs.paint3);
canvas.drawText(text, x1, y1, circleAttrs.paint2); canvas.drawText(text, x1, y1, circleAttrs.paint2);
canvas.drawText(text, x2, y2, circleAttrs.shadowPaint); canvas.drawText(text, x2, y2, circleAttrs.paint3);
canvas.drawText(text, x2, y2, circleAttrs.paint2); canvas.drawText(text, x2, y2, circleAttrs.paint2);
canvas.rotate(tb.getRotate(), center.x, center.y); canvas.rotate(tb.getRotate(), center.x, center.y);
} }