Skip to content

Commit

Permalink
Map scale bar improvements (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 authored Apr 13, 2021
1 parent 354bc16 commit d5543bd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vtm/src/org/oscim/scalebar/DefaultMapScaleBar.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2014-2019 devemux86
* Copyright 2014-2021 devemux86
* Copyright 2014 Erik Duisters
* Copyright 2014 Christian Pesch
*
Expand Down Expand Up @@ -66,6 +66,11 @@ public DefaultMapScaleBar(Map map, float scale) {
this.paintScaleTextStroke = createTextPaint(Color.WHITE, 2, Paint.Style.STROKE);
}

public void setColor(int color) {
this.paintScaleBar.setColor(color);
this.paintScaleText.setColor(color);
}

/**
* @return the secondary {@link DistanceUnitAdapter} in use by this MapScaleBar
*/
Expand Down Expand Up @@ -100,7 +105,7 @@ private Paint createScaleBarPaint(int color, float strokeWidth, Paint.Style styl
paint.setColor(color);
paint.setStrokeWidth(strokeWidth * this.scale);
paint.setStyle(style);
paint.setStrokeCap(Paint.Cap.SQUARE);
paint.setStrokeCap(Paint.Cap.ROUND);
return paint;
}

Expand Down

0 comments on commit d5543bd

Please sign in to comment.