Add the ability to fake bold text in the MapTextLayer

This commit is contained in:
Alex Sytnyk 2018-07-25 17:25:23 +03:00
parent b04b7b085e
commit c876c0aadb
4 changed files with 18 additions and 0 deletions

View file

@ -263,6 +263,11 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
return settings.SHOW_POI_LABEL.get(); return settings.SHOW_POI_LABEL.get();
} }
@Override
public boolean isFakeBoldText() {
return false;
}
@Override @Override
public boolean isObjectMovable(Object o) { public boolean isObjectMovable(Object o) {

View file

@ -637,6 +637,11 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
return view.getSettings().SHOW_POI_LABEL.get(); return view.getSettings().SHOW_POI_LABEL.get();
} }
@Override
public boolean isFakeBoldText() {
return false;
}
public void setGivenGpx(GPXFile gpx) { public void setGivenGpx(GPXFile gpx) {
this.gpx = gpx; this.gpx = gpx;

View file

@ -36,6 +36,8 @@ public class MapTextLayer extends OsmandMapLayer {
String getText(T o); String getText(T o);
boolean isTextVisible(); boolean isTextVisible();
boolean isFakeBoldText();
} }
public void putData(OsmandMapLayer ml, Collection<?> objects) { public void putData(OsmandMapLayer ml, Collection<?> objects) {
@ -60,6 +62,7 @@ public class MapTextLayer extends OsmandMapLayer {
continue; continue;
} }
paintTextIcon.setFakeBoldText(provider.isFakeBoldText());
for (Object o : textObjects.get(l)) { for (Object o : textObjects.get(l)) {
double lat = provider.getTextLocation(o).getLatitude(); double lat = provider.getTextLocation(o).getLatitude();
double lon = provider.getTextLocation(o).getLongitude(); double lon = provider.getTextLocation(o).getLongitude();

View file

@ -420,6 +420,11 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
return app.getSettings().SHOW_POI_LABEL.get(); return app.getSettings().SHOW_POI_LABEL.get();
} }
@Override
public boolean isFakeBoldText() {
return false;
}
@Override @Override
public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) { public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) {
} }