1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 06:43:22 +02:00

Some more ENC render style enhancements

This commit is contained in:
Martin Tůma 2022-11-26 13:05:08 +01:00
parent a05098f502
commit 12b17487ac
8 changed files with 68 additions and 47 deletions

View File

@ -179,6 +179,10 @@
<file alias="conveyor-line.png">icons/map/marine/conveyor-line.png</file>
<file alias="pipeline-overhead.png">icons/map/marine/pipeline-overhead.png</file>
<file alias="coast-guard.png">icons/map/marine/coast-guard.png</file>
<file alias="monument.png">icons/map/marine/monument.png</file>
<file alias="radio.png">icons/map/marine/radio.png</file>
<file alias="radar.png">icons/map/marine/radar.png</file>
<file alias="radar-transponder.png">icons/map/marine/radar-transponder.png</file>
</qresource>
<!-- Mapsforge rendertheme -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

BIN
icons/map/marine/radar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

BIN
icons/map/marine/radio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View File

@ -28,33 +28,36 @@ static QMap<uint,uint> orderMapInit()
map.insert(SUBTYPE(BUAARE, 2), 5);
map.insert(SUBTYPE(BUAARE, 6), 6);
map.insert(SUBTYPE(BUAARE, 0), 7);
map.insert(TYPE(BCNISD), 8);
map.insert(TYPE(BCNLAT), 9);
map.insert(TYPE(I_BCNLAT), 9);
map.insert(TYPE(BCNSAW), 10);
map.insert(TYPE(BCNSPP), 11);
map.insert(TYPE(BOYCAR), 12);
map.insert(TYPE(BOYINB), 13);
map.insert(TYPE(BOYISD), 14);
map.insert(TYPE(BOYLAT), 15);
map.insert(TYPE(I_BOYLAT), 15);
map.insert(TYPE(BOYSAW), 16);
map.insert(TYPE(BOYSPP), 17);
map.insert(TYPE(MORFAC), 18);
map.insert(TYPE(OFSPLF), 19);
map.insert(TYPE(LIGHTS), 20);
map.insert(TYPE(OBSTRN), 21);
map.insert(TYPE(WRECKS), 22);
map.insert(TYPE(UWTROC), 23);
map.insert(TYPE(HRBFAC), 24);
map.insert(TYPE(PILPNT), 25);
map.insert(TYPE(ACHBRT), 26);
map.insert(TYPE(I_ACHBRT), 26);
map.insert(TYPE(CRANES), 27);
map.insert(TYPE(I_CRANES), 27);
map.insert(TYPE(LNDMRK), 28);
map.insert(TYPE(LNDELV), 29);
map.insert(TYPE(I_DISMAR), 30);
map.insert(TYPE(RDOSTA), 8);
map.insert(TYPE(RADSTA), 9);
map.insert(TYPE(RTPBCN), 10);
map.insert(TYPE(BCNISD), 11);
map.insert(TYPE(BCNLAT), 12);
map.insert(TYPE(I_BCNLAT), 12);
map.insert(TYPE(BCNSAW), 13);
map.insert(TYPE(BCNSPP), 14);
map.insert(TYPE(BOYCAR), 15);
map.insert(TYPE(BOYINB), 16);
map.insert(TYPE(BOYISD), 17);
map.insert(TYPE(BOYLAT), 18);
map.insert(TYPE(I_BOYLAT), 18);
map.insert(TYPE(BOYSAW), 19);
map.insert(TYPE(BOYSPP), 20);
map.insert(TYPE(MORFAC), 21);
map.insert(TYPE(OFSPLF), 22);
map.insert(TYPE(LIGHTS), 23);
map.insert(TYPE(OBSTRN), 24);
map.insert(TYPE(WRECKS), 25);
map.insert(TYPE(UWTROC), 26);
map.insert(TYPE(HRBFAC), 27);
map.insert(TYPE(PILPNT), 28);
map.insert(TYPE(ACHBRT), 29);
map.insert(TYPE(I_ACHBRT), 29);
map.insert(TYPE(CRANES), 30);
map.insert(TYPE(I_CRANES), 30);
map.insert(TYPE(LNDMRK), 31);
map.insert(TYPE(LNDELV), 32);
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
return map;
@ -870,25 +873,25 @@ Range MapData::zooms() const
double size = qMin(_bounds.width(), _bounds.height());
if (size > 180)
return Range(0, 20);
return Range(0, 10);
else if (size > 90)
return Range(1, 20);
return Range(1, 11);
else if (size > 45)
return Range(2, 20);
return Range(2, 12);
else if (size > 22.5)
return Range(3, 20);
return Range(3, 13);
else if (size > 11.25)
return Range(4, 20);
return Range(4, 14);
else if (size > 5.625)
return Range(5, 20);
return Range(5, 15);
else if (size > 2.813)
return Range(6, 20);
return Range(6, 16);
else if (size > 1.406)
return Range(7, 20);
return Range(7, 17);
else if (size > 0.703)
return Range(8, 20);
return Range(8, 18);
else if (size > 0.352)
return Range(9, 20);
return Range(9, 19);
else if (size > 0.176)
return Range(10, 20);
else if (size > 0.088)

View File

@ -46,6 +46,7 @@
#define LNDELV 72
#define LNDMRK 74
#define LIGHTS 75
#define LOKBSN 79
#define MORFAC 84
#define NAVLNE 85
#define OBSTRN 86
@ -56,6 +57,9 @@
#define PONTON 95
#define PRCARE 96
#define PYLONS 98
#define RADSTA 102
#define RTPBCN 103
#define RDOSTA 105
#define RAILWY 106
#define RCRTCL 108
#define RECTRC 109
@ -83,6 +87,7 @@
#define I_BRIDGE 17011
#define I_CBLOHD 17012
#define I_FERYRT 17013
#define I_LOKBSN 17016
#define I_HULKES 17020
#define I_PONTON 17021
#define I_PIPOHD 17024

View File

@ -86,22 +86,26 @@ void Style::defaultPolygonStyle()
QPen(QColor("#966118")));
_polygons[TYPE(SILTNK)] = Polygon(QBrush("#d98b21"), QPen(QColor("#966118"),
2));
_polygons[TYPE(LOKBSN)] = Polygon(QBrush(QColor("#333333"),
Qt::Dense7Pattern));
_polygons[TYPE(I_LOKBSN)] = Polygon(QBrush(QColor("#333333"),
Qt::Dense7Pattern));
_drawOrder
<< TYPE(M_COVR) << TYPE(LNDARE) << SUBTYPE(DEPARE, 0)
<< SUBTYPE(DEPARE, 1) << SUBTYPE(DEPARE, 2) << SUBTYPE(DEPARE, 3)
<< TYPE(UNSARE) << SUBTYPE(DEPARE, 4) << SUBTYPE(DEPARE, 5)
<< SUBTYPE(DEPARE, 6) << TYPE(LAKARE) << TYPE(CANALS) << TYPE(DYKCON)
<< TYPE(RIVERS) << TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(BUAARE)
<< TYPE(BUISGL) << TYPE(SILTNK) << TYPE(AIRARE) << TYPE(BRIDGE)
<< TYPE(I_BRIDGE) << TYPE(I_TERMNL) << TYPE(SLCONS) << TYPE(I_SLCONS)
<< TYPE(PONTON) << TYPE(I_PONTON) << TYPE(HULKES) << TYPE(I_HULKES)
<< TYPE(FLODOC) << TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON)
<< TYPE(PYLONS) << TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON)
<< TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC)
<< TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << SUBTYPE(I_ACHARE, 1)
<< SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
<< TYPE(PRCARE);
<< TYPE(RIVERS) << TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(LOKBSN)
<< TYPE(I_LOKBSN) << TYPE(BUAARE) << TYPE(BUISGL) << TYPE(SILTNK)
<< TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(I_TERMNL)
<< TYPE(SLCONS) << TYPE(I_SLCONS) << TYPE(PONTON) << TYPE(I_PONTON)
<< TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC) << TYPE(I_FLODOC)
<< TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS) << TYPE(MORFAC)
<< TYPE(GATCON) << TYPE(I_GATCON) << TYPE(DMPGRD) << TYPE(TSEZNE)
<< TYPE(OBSTRN) << TYPE(UWTROC) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1)
<< SUBTYPE(I_ACHARE, 1) << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2)
<< SUBTYPE(I_RESARE, 2) << TYPE(PRCARE);
}
void Style::defaultLineStyle()
@ -149,6 +153,7 @@ void Style::defaultLineStyle()
_lines[TYPE(CONVYR)] = Line(QImage(":/marine/conveyor-line.png"));
_lines[TYPE(PIPOHD)] = Line(QImage(":/marine/pipeline-overhead.png"));
_lines[TYPE(I_PIPOHD)] = Line(QImage(":/marine/pipeline-overhead.png"));
_lines[TYPE(CANALS)] = Line(QPen(QColor("#9fc4e1"), 2));
}
void Style::defaultPointStyle()
@ -173,6 +178,7 @@ void Style::defaultPointStyle()
_points[TYPE(BCNSAW)] = Point(QImage(":/marine/beacon.png"), Small);
_points[TYPE(BCNSPP)] = Point(QImage(":/marine/beacon.png"), Small);
_points[SUBTYPE(LNDMRK, 3)] = Point(QImage(":/marine/chimney.png"));
_points[SUBTYPE(LNDMRK, 9)] = Point(QImage(":/marine/monument.png"));
_points[SUBTYPE(LNDMRK, 20)] = Point(QImage(":/marine/church.png"));
_points[SUBTYPE(LNDMRK, 17)] = Point(QImage(":/marine/tower.png"));
_points[TYPE(LNDELV)] = Point(QImage(":/marine/triangulation-point.png"));
@ -209,6 +215,9 @@ void Style::defaultPointStyle()
_points[SUBTYPE(I_DISMAR, 1)].setTextColor(QColor("#ffffff"));
_points[SUBTYPE(I_DISMAR, 1)].setTextFontSize(Small);
_points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png"));
_points[TYPE(RDOSTA)] = Point(QImage(":/marine/radio.png"));
_points[TYPE(RADSTA)] = Point(QImage(":/marine/radar.png"));
_points[TYPE(RTPBCN)] = Point(QImage(":/marine/radar-transponder.png"));
}
Style::Style()