From 734ba4bf4455bc055e81a5c1aa263d09df2b0965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 13 Nov 2024 17:16:22 +0100 Subject: [PATCH] Use SVG arrows instead of PNGs --- gpxsee.qrc | 6 ++---- icons/map/arrow.png | Bin 175 -> 0 bytes icons/map/arrow.svg | 12 ++++++++++++ icons/map/arrow@2x.png | Bin 241 -> 0 bytes icons/map/water-arrow.png | Bin 181 -> 0 bytes icons/map/water-arrow.svg | 12 ++++++++++++ icons/map/water-arrow@2x.png | Bin 249 -> 0 bytes src/map/IMG/rastertile.cpp | 10 +++------- 8 files changed, 29 insertions(+), 11 deletions(-) delete mode 100644 icons/map/arrow.png create mode 100644 icons/map/arrow.svg delete mode 100644 icons/map/arrow@2x.png delete mode 100644 icons/map/water-arrow.png create mode 100644 icons/map/water-arrow.svg delete mode 100644 icons/map/water-arrow@2x.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 7bc24c23..7c044188 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -6,10 +6,8 @@ - icons/map/arrow.png - icons/map/arrow@2x.png - icons/map/water-arrow.png - icons/map/water-arrow@2x.png + icons/map/arrow.svg + icons/map/water-arrow.svg diff --git a/icons/map/arrow.png b/icons/map/arrow.png deleted file mode 100644 index b0e607f70b1cdf0f2c19c3cc39d952f05dbc716a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~p!3HE570x;VDYhhUcNZWH1V5d3*8?fe0*}aI z1_nK45N51cYF`Ev^!Ide43W6JwC^-;g93wd^ka^7*I!y`$cZTNDs{fU@r8X)F+&39 zr7gZ(vm%95Vv|G)ugtnqaMWy9lgXN--~XHEs-!=B?oj^s+{bKN`DYI}IlHXHy4JtE P46@hL)z4*}Q$iB}uDCa3 diff --git a/icons/map/arrow.svg b/icons/map/arrow.svg new file mode 100644 index 00000000..bd07eabb --- /dev/null +++ b/icons/map/arrow.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/icons/map/arrow@2x.png b/icons/map/arrow@2x.png deleted file mode 100644 index 3dffad2ca4d68489f3fb275d98ce381583dcf4b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-q!3HG#?#OKdQfx`y?k+$Y2!1;6t_M<_1s;*b z3=De8Ak0{?)V>TTIMLI^F~s8Z(J796hZT5Oj!%jCWFL2uUwP{})oB@1gra#*#_Uii z+rri&A#A{$pTH;**&VwGYjY z=-`xC>ydBsXzi<>y$#{d#2V*y{8?3CqBgl=#&P!v@7Mf(A@uCT`m5D#6E7^}t!UQ& h-=Vbd@Oy`pHQKD^K9WKa3{yca_jL7hS?83{1OQw@RTcmM diff --git a/icons/map/water-arrow.png b/icons/map/water-arrow.png deleted file mode 100644 index 50d1f8b3c18ab00f9739114d94c7047bfe1e2a17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~p!3HE570x;VDYhhUcNZWH1V5d3*8?fe0*}aI z1_nK45N51cYF`Ev4E1zz43W5;oN$2GMFI%^FJ>%p^{L=#(2gtkB6zrIalb-S2Ag4$ zv8e0;lfw>8TVhT{g7ec-xC7?!T|Mq`qO3%GQ8WjGZ>hCg T;^b#DLAHCk`njxgN@xNAwJtL- diff --git a/icons/map/water-arrow.svg b/icons/map/water-arrow.svg new file mode 100644 index 00000000..3002ce48 --- /dev/null +++ b/icons/map/water-arrow.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/icons/map/water-arrow@2x.png b/icons/map/water-arrow@2x.png deleted file mode 100644 index a57bb6adafc13705a705d87456aeab56a2fc5f0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-q!3HG#?#OKdQfx`y?k+$Y2!1;6t_M<_1s;*b z3=De8Ak0{?)V>TTIMdU`F~s8Z(J2Rcn+Cn5BDzWzT299Kft?yX9HJcJv z^X~E13;cJvTu9N4|4xIr0rTcnuc{_@bbLP`B2uCMa9iFY?s?3`0Scm*Vl_X?s57)3 z|Lgr^h3G?fog*wgK}*c!K8BSZi8`QN+~wfw@=YtJ_oRy6vrmFgj9=f|)nfT6`|7+z pl`Waf_a5x8cbRzMS-FDIHU7(+JsekeKIj4Yz|+;wWt~$(69DF7TV? #include #include +#include "common/util.h" #include "map/dem.h" #include "map/textpathitem.h" #include "map/textpointitem.h" @@ -21,11 +22,6 @@ 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 @@ -517,8 +513,8 @@ void RasterTile::render() QList textItems; QImage arrows[2]; - arrows[ROAD] = HIDPI_IMG(":/map", "arrow", _ratio); - arrows[WATER] = HIDPI_IMG(":/map", "water-arrow", _ratio); + arrows[ROAD] = Util::svg2img(":/map/arrow.svg", _ratio); + arrows[WATER] = Util::svg2img(":/map/water-arrow.svg", _ratio); fetchData(polygons, lines, points); ll2xy(polygons);