1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
7c099b8f66 Added building=fire_station rendering 2024-02-12 22:39:15 +01:00
ea29155463 Code cleanup 2024-02-12 22:38:42 +01:00
2 changed files with 8 additions and 5 deletions

View File

@ -1006,7 +1006,7 @@
<rule e="any" k="amenity" v="police" zoom-min="17">
<symbol src=":/mapsforge/symbols/amenity/police2.svg" />
</rule>
<rule e="any" k="amenity" v="fire_station" zoom-min="17">
<rule e="any" k="amenity|building" v="fire_station" zoom-min="17">
<symbol src=":/mapsforge/symbols/amenity/firestation3.svg" />
</rule>
</rule>

View File

@ -17,6 +17,11 @@ using namespace IMG;
#define AREA(rect) \
(rect.size().width() * rect.size().height())
#define HIDPI_IMG(dir, basename, ratio) \
(((ratio) > 1.0) \
? QImage(dir "/" basename "@2x.png") \
: QImage(dir "/" basename ".png"))
#define ROAD 0
#define WATER 1
@ -446,10 +451,8 @@ void RasterTile::render()
QList<TextItem*> textItems;
QImage arrows[2];
arrows[ROAD] = (_ratio > 1.0)
? QImage(":/map/arrow@2x.png") : QImage(":/map/arrow.png");
arrows[WATER] = (_ratio > 1.0)
? QImage(":/map/water-arrow@2x.png") : QImage(":/map/water-arrow.png");
arrows[ROAD] = HIDPI_IMG(":/map", "arrow", _ratio);
arrows[WATER] = HIDPI_IMG(":/map", "water-arrow", _ratio);
fetchData(polygons, lines, points);
ll2xy(polygons);