diff --git a/.appveyor.yml b/.appveyor.yml
index 5088f737..dce946ae 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,4 +1,4 @@
-version: 13.42.{build}
+version: 13.43.{build}
configuration:
- Release
diff --git a/gpxsee.pro b/gpxsee.pro
index ab247eaf..9db51f84 100644
--- a/gpxsee.pro
+++ b/gpxsee.pro
@@ -3,7 +3,7 @@ unix:!macx:!android {
} else {
TARGET = GPXSee
}
-VERSION = 13.42
+VERSION = 13.43
QT += core \
gui \
diff --git a/gpxsee.qrc b/gpxsee.qrc
index 652940ec..735dbf77 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -144,7 +144,9 @@
icons/map/marine/buoy-white-green.png
icons/map/marine/buoy-white-red.png
icons/map/marine/buoy-white-yellow.png
+ icons/map/marine/buoy-white-orange.png
icons/map/marine/buoy-white-yellow-white.png
+ icons/map/marine/buoy-white-orange-white.png
icons/map/marine/buoy-green.png
icons/map/marine/buoy-green-white.png
icons/map/marine/buoy-green-white-green-white.png
@@ -172,14 +174,21 @@
icons/map/marine/buoy-black-red-black.png
icons/map/marine/buoy-black-green.png
icons/map/marine/buoy-black-yellow.png
+ icons/map/marine/buoy-black-orange.png
icons/map/marine/buoy-black-yellow-black.png
+ icons/map/marine/buoy-orange.png
+ icons/map/marine/buoy-orange-white.png
+ icons/map/marine/buoy-orange-black.png
+ icons/map/marine/buoy-grey.png
icons/map/marine/beacon.png
icons/map/marine/beacon-white.png
icons/map/marine/beacon-white-black.png
icons/map/marine/beacon-white-green.png
icons/map/marine/beacon-white-red.png
icons/map/marine/beacon-white-yellow.png
+ icons/map/marine/beacon-white-orange.png
icons/map/marine/beacon-white-yellow-white.png
+ icons/map/marine/beacon-white-orange-white.png
icons/map/marine/beacon-green.png
icons/map/marine/beacon-green-white.png
icons/map/marine/beacon-green-white-green-white.png
@@ -207,7 +216,12 @@
icons/map/marine/beacon-black-red-black.png
icons/map/marine/beacon-black-green.png
icons/map/marine/beacon-black-yellow.png
+ icons/map/marine/beacon-black-orange.png
icons/map/marine/beacon-black-yellow-black.png
+ icons/map/marine/beacon-orange.png
+ icons/map/marine/beacon-orange-white.png
+ icons/map/marine/beacon-orange-black.png
+ icons/map/marine/beacon-grey.png
icons/map/marine/spar-buoy.png
icons/map/marine/spar-buoy-red.png
icons/map/marine/spar-buoy-green.png
@@ -311,6 +325,16 @@
icons/map/marine/fishing-farm.png
icons/map/marine/shellfish-farm-line.png
icons/map/marine/degaussing-line.png
+ icons/map/marine/nofishing-line.png
+ icons/map/marine/fishing-line.png
+ icons/map/marine/minefield-line.png
+ icons/map/marine/international-maritime-boundary.png
+ icons/map/marine/straight-territorial-sea-baseline.png
+ icons/map/marine/seaward-limit-of-territorial-sea.png
+ icons/map/marine/seaward-limit-of-contiguous-zone.png
+ icons/map/marine/foul.png
+ icons/map/marine/dumping-ground-line.png
+ icons/map/marine/radio-call-garmin.png
diff --git a/icons/map/marine/anchor-line.png b/icons/map/marine/anchor-line.png
index 43067ec8..27dfaabb 100644
Binary files a/icons/map/marine/anchor-line.png and b/icons/map/marine/anchor-line.png differ
diff --git a/icons/map/marine/beacon-black-orange.png b/icons/map/marine/beacon-black-orange.png
new file mode 100644
index 00000000..214f8cb2
Binary files /dev/null and b/icons/map/marine/beacon-black-orange.png differ
diff --git a/icons/map/marine/beacon-grey.png b/icons/map/marine/beacon-grey.png
new file mode 100644
index 00000000..28439314
Binary files /dev/null and b/icons/map/marine/beacon-grey.png differ
diff --git a/icons/map/marine/beacon-orange-black.png b/icons/map/marine/beacon-orange-black.png
new file mode 100644
index 00000000..63791879
Binary files /dev/null and b/icons/map/marine/beacon-orange-black.png differ
diff --git a/icons/map/marine/beacon-orange-white.png b/icons/map/marine/beacon-orange-white.png
new file mode 100644
index 00000000..fcfd16d7
Binary files /dev/null and b/icons/map/marine/beacon-orange-white.png differ
diff --git a/icons/map/marine/beacon-orange.png b/icons/map/marine/beacon-orange.png
new file mode 100644
index 00000000..7511fe60
Binary files /dev/null and b/icons/map/marine/beacon-orange.png differ
diff --git a/icons/map/marine/beacon-white-orange-white.png b/icons/map/marine/beacon-white-orange-white.png
new file mode 100644
index 00000000..e2621878
Binary files /dev/null and b/icons/map/marine/beacon-white-orange-white.png differ
diff --git a/icons/map/marine/beacon-white-orange.png b/icons/map/marine/beacon-white-orange.png
new file mode 100644
index 00000000..739ad7ff
Binary files /dev/null and b/icons/map/marine/beacon-white-orange.png differ
diff --git a/icons/map/marine/buoy-black-orange.png b/icons/map/marine/buoy-black-orange.png
new file mode 100644
index 00000000..f565753b
Binary files /dev/null and b/icons/map/marine/buoy-black-orange.png differ
diff --git a/icons/map/marine/buoy-grey.png b/icons/map/marine/buoy-grey.png
new file mode 100644
index 00000000..4ba559f7
Binary files /dev/null and b/icons/map/marine/buoy-grey.png differ
diff --git a/icons/map/marine/buoy-orange-black.png b/icons/map/marine/buoy-orange-black.png
new file mode 100644
index 00000000..578e92a8
Binary files /dev/null and b/icons/map/marine/buoy-orange-black.png differ
diff --git a/icons/map/marine/buoy-orange-white.png b/icons/map/marine/buoy-orange-white.png
new file mode 100644
index 00000000..5de1acb2
Binary files /dev/null and b/icons/map/marine/buoy-orange-white.png differ
diff --git a/icons/map/marine/buoy-orange.png b/icons/map/marine/buoy-orange.png
new file mode 100644
index 00000000..07ddb01f
Binary files /dev/null and b/icons/map/marine/buoy-orange.png differ
diff --git a/icons/map/marine/buoy-white-orange-white.png b/icons/map/marine/buoy-white-orange-white.png
new file mode 100644
index 00000000..858f8a2c
Binary files /dev/null and b/icons/map/marine/buoy-white-orange-white.png differ
diff --git a/icons/map/marine/buoy-white-orange.png b/icons/map/marine/buoy-white-orange.png
new file mode 100644
index 00000000..7f7e2ffb
Binary files /dev/null and b/icons/map/marine/buoy-white-orange.png differ
diff --git a/icons/map/marine/cable-area-line.png b/icons/map/marine/cable-area-line.png
index f8ed6111..775eed1f 100644
Binary files a/icons/map/marine/cable-area-line.png and b/icons/map/marine/cable-area-line.png differ
diff --git a/icons/map/marine/dumping-ground-line.png b/icons/map/marine/dumping-ground-line.png
new file mode 100644
index 00000000..29656278
Binary files /dev/null and b/icons/map/marine/dumping-ground-line.png differ
diff --git a/icons/map/marine/dw-route-line.png b/icons/map/marine/dw-route-line.png
index ba5fed55..3f707b08 100644
Binary files a/icons/map/marine/dw-route-line.png and b/icons/map/marine/dw-route-line.png differ
diff --git a/icons/map/marine/fishing-farm-line.png b/icons/map/marine/fishing-farm-line.png
index c2282df1..b066da1c 100644
Binary files a/icons/map/marine/fishing-farm-line.png and b/icons/map/marine/fishing-farm-line.png differ
diff --git a/icons/map/marine/fishing-line.png b/icons/map/marine/fishing-line.png
new file mode 100644
index 00000000..e613198f
Binary files /dev/null and b/icons/map/marine/fishing-line.png differ
diff --git a/icons/map/marine/foul.png b/icons/map/marine/foul.png
new file mode 100644
index 00000000..da2b4aa8
Binary files /dev/null and b/icons/map/marine/foul.png differ
diff --git a/icons/map/marine/international-maritime-boundary.png b/icons/map/marine/international-maritime-boundary.png
new file mode 100644
index 00000000..86a5c02e
Binary files /dev/null and b/icons/map/marine/international-maritime-boundary.png differ
diff --git a/icons/map/marine/minefield-line.png b/icons/map/marine/minefield-line.png
new file mode 100644
index 00000000..91deabb4
Binary files /dev/null and b/icons/map/marine/minefield-line.png differ
diff --git a/icons/map/marine/noanchor-line.png b/icons/map/marine/noanchor-line.png
index c50af80a..9dbc52dd 100644
Binary files a/icons/map/marine/noanchor-line.png and b/icons/map/marine/noanchor-line.png differ
diff --git a/icons/map/marine/nofishing-line.png b/icons/map/marine/nofishing-line.png
new file mode 100644
index 00000000..d07e1be2
Binary files /dev/null and b/icons/map/marine/nofishing-line.png differ
diff --git a/icons/map/marine/pipeline-area-line.png b/icons/map/marine/pipeline-area-line.png
index ac80ec25..021516e9 100644
Binary files a/icons/map/marine/pipeline-area-line.png and b/icons/map/marine/pipeline-area-line.png differ
diff --git a/icons/map/marine/radio-call-garmin.png b/icons/map/marine/radio-call-garmin.png
new file mode 100644
index 00000000..9d3e44b4
Binary files /dev/null and b/icons/map/marine/radio-call-garmin.png differ
diff --git a/icons/map/marine/seaward-limit-of-contiguous-zone.png b/icons/map/marine/seaward-limit-of-contiguous-zone.png
new file mode 100644
index 00000000..b9c41e0e
Binary files /dev/null and b/icons/map/marine/seaward-limit-of-contiguous-zone.png differ
diff --git a/icons/map/marine/seaward-limit-of-territorial-sea.png b/icons/map/marine/seaward-limit-of-territorial-sea.png
new file mode 100644
index 00000000..d8049b27
Binary files /dev/null and b/icons/map/marine/seaward-limit-of-territorial-sea.png differ
diff --git a/icons/map/marine/shellfish-farm-line.png b/icons/map/marine/shellfish-farm-line.png
index 7236ec51..dda159c1 100644
Binary files a/icons/map/marine/shellfish-farm-line.png and b/icons/map/marine/shellfish-farm-line.png differ
diff --git a/icons/map/marine/straight-territorial-sea-baseline.png b/icons/map/marine/straight-territorial-sea-baseline.png
new file mode 100644
index 00000000..09fd3781
Binary files /dev/null and b/icons/map/marine/straight-territorial-sea-baseline.png differ
diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi
index b0d98d35..801c0937 100644
--- a/pkg/windows/gpxsee64.nsi
+++ b/pkg/windows/gpxsee64.nsi
@@ -49,7 +49,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
-!define VERSION "13.42"
+!define VERSION "13.43"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h
index 7cef6a21..8502882b 100644
--- a/src/map/ENC/attributes.h
+++ b/src/map/ENC/attributes.h
@@ -5,6 +5,7 @@
#define CATBUA 10
#define CATCOV 18
#define CATDIS 21
+#define CATDPG 23
#define CATHAF 30
#define CATLMK 35
#define CATLIT 37
@@ -12,6 +13,7 @@
#define CATMOR 40
#define CATTRK 54
#define CATREA 56
+#define CATSLC 60
#define CATSIT 61
#define CATSIL 63
#define CATSCF 65
@@ -24,6 +26,7 @@
#define DRVAL1 87
#define ELEVAT 90
#define FUNCTN 94
+#define JRSDTN 103
#define LITVIS 108
#define OBJNAM 116
#define ORIENT 117
@@ -41,6 +44,7 @@
#define I_CATSIT 17002
#define I_RESTRN 17004
#define I_CATHAF 17008
+#define I_CATSLC 17012
#define I_RDOCAL 17017
#define I_WTWDIS 17064
#define I_CATBRT 17066
diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp
index 1819f66c..2f62a8e0 100644
--- a/src/map/ENC/mapdata.cpp
+++ b/src/map/ENC/mapdata.cpp
@@ -87,6 +87,7 @@ static QMap orderMapInit()
map.insert(TYPE(BUISGL), 46);
map.insert(TYPE(ACHARE), 47);
map.insert(TYPE(I_ACHARE), 47);
+ map.insert(TYPE(DMPGRD), 48);
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
@@ -191,7 +192,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN
|| baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE
|| baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA
- || baseType == PILBOP
+ || baseType == PILBOP || baseType == DMPGRD
|| type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2)
|| type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3)
|| type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9)
@@ -199,6 +200,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
|| type == SUBTYPE(I_ACHARE, 12) || type == SUBTYPE(I_BERTHS, 6)
|| type == SUBTYPE(RESARE, 1) || type == SUBTYPE(I_RESARE, 1)
|| type == SUBTYPE(RESARE, 2) || type == SUBTYPE(I_RESARE, 2)
+ || type == SUBTYPE(RESARE, 3) || type == SUBTYPE(I_RESARE, 3)
|| type == SUBTYPE(RESARE, 4) || type == SUBTYPE(I_RESARE, 4)
|| type == SUBTYPE(RESARE, 5) || type == SUBTYPE(I_RESARE, 5)
|| type == SUBTYPE(RESARE, 6) || type == SUBTYPE(I_RESARE, 6)
@@ -323,6 +325,8 @@ static uint restrictionCategory(uint type, const MapData::Attributes &attr)
if (restrn == 1)
return 2;
+ else if (restrn == 3)
+ return 3;
else if (restrn == 7)
return 17;
else
@@ -335,8 +339,12 @@ static uint color(const QList &list)
{
uint c = 0;
- for (int i = 0; i < list.size() && i < 4; i++)
- c |= list.at(i).toUInt() << (i * 4);
+ for (int i = 0, j = 0; i < list.size() && j < 4; i++) {
+ if (!(i && list.at(i) == list.at(i-1))) {
+ c |= list.at(i).toUInt() << (j * 4);
+ j++;
+ }
+ }
return c;
}
@@ -447,7 +455,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
if (ok && clr > 0)
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
- } else if (type == OBSTRN || type == WRECKS) {
+ } else if (type == OBSTRN || type == WRECKS || type == UWTROC) {
double depth = _attr.value(VALSOU).toDouble(&ok);
if (ok && _label.isEmpty())
_label = QString::number(depth);
@@ -474,6 +482,14 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr,
subtype = I_CATBRT;
else if (type == M_COVR)
subtype = CATCOV;
+ else if (type == DMPGRD)
+ subtype = CATDPG;
+ else if (type == SLCONS)
+ subtype = CATSLC;
+ else if (type == I_SLCONS)
+ subtype = I_CATSLC;
+ else if (type == ADMARE)
+ subtype = JRSDTN;
switch (type) {
case DEPARE:
@@ -509,6 +525,8 @@ MapData::Line::Line(uint type, const QVector &path,
_label = QString::fromLatin1(_attr.value(VALDCO));
else if (type == LNDELV)
_label = QString::fromLatin1(_attr.value(ELEVAT));
+ else if (type == RECTRC)
+ _label = QString::fromLatin1(_attr.value(ORIENT));
else
_label = QString::fromLatin1(_attr.value(OBJNAM));
}
diff --git a/src/map/ENC/objects.h b/src/map/ENC/objects.h
index aea5ebce..b393893b 100644
--- a/src/map/ENC/objects.h
+++ b/src/map/ENC/objects.h
@@ -4,6 +4,7 @@
#define TYPE(t) ((t)<<16)
#define SUBTYPE(t, s) (((t)<<16)|(s))
+#define ADMARE 1
#define AIRARE 2
#define ACHBRT 3
#define ACHARE 4
@@ -88,6 +89,8 @@
#define SLOTOP 126
#define SMCFAC 128
#define SOUNDG 129
+#define STSLNE 132
+#define TESARE 135
#define TSELNE 145
#define TSSBND 146
#define TSSLPT 148
diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp
index ea39fd16..b6f60647 100644
--- a/src/map/ENC/style.cpp
+++ b/src/map/ENC/style.cpp
@@ -21,25 +21,26 @@ using namespace Util;
PNT(type, 4, ":/marine/" name "-green.png", dx, dy); \
PNT(type, 5, ":/marine/" name ".png", dx, dy); \
PNT(type, 6, ":/marine/" name "-yellow.png", dx, dy); \
- PNT(type, 7, ":/marine/" name ".png", dx, dy); \
- PNT(type, 8, ":/marine/" name ".png", dx, dy); \
- PNT(type, 9, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 7, ":/marine/" name "-grey.png", dx, dy); \
+ PNT(type, 8, ":/marine/" name "-orange.png", dx, dy); \
+ PNT(type, 9, ":/marine/" name "-orange.png", dx, dy); \
PNT(type, 10, ":/marine/" name ".png", dx, dy); \
- PNT(type, 11, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 11, ":/marine/" name "-orange.png", dx, dy); \
PNT(type, 12, ":/marine/" name ".png", dx, dy); \
PNT(type, 13, ":/marine/" name ".png", dx, dy); \
PNT(type, COLOR2(1, 2), ":/marine/" name "-white-black.png", dx, dy); \
PNT(type, COLOR2(1, 3), ":/marine/" name "-white-red.png", dx, dy); \
PNT(type, COLOR2(1, 4), ":/marine/" name "-white-green.png", dx, dy); \
PNT(type, COLOR2(1, 6), ":/marine/" name "-white-yellow.png", dx, dy); \
- PNT(type, COLOR2(1, 9), ":/marine/" name "-white-yellow.png", dx, dy); \
- PNT(type, COLOR2(1, 11), ":/marine/" name "-white-yellow.png", dx, dy); \
+ PNT(type, COLOR2(1, 8), ":/marine/" name "-white-orange.png", dx, dy); \
+ PNT(type, COLOR2(1, 9), ":/marine/" name "-white-orange.png", dx, dy); \
+ PNT(type, COLOR2(1, 11), ":/marine/" name "-white-orange.png", dx, dy); \
PNT(type, COLOR2(2, 1), ":/marine/" name "-black-white.png", dx, dy); \
PNT(type, COLOR2(2, 3), ":/marine/" name "-black-red.png", dx, dy); \
PNT(type, COLOR2(2, 4), ":/marine/" name "-black-green.png", dx, dy); \
PNT(type, COLOR2(2, 6), ":/marine/" name "-black-yellow.png", dx, dy); \
- PNT(type, COLOR2(2, 9), ":/marine/" name "-black-yellow.png", dx, dy); \
- PNT(type, COLOR2(2, 11), ":/marine/" name "-black-yellow.png", dx, dy); \
+ PNT(type, COLOR2(2, 9), ":/marine/" name "-black-orange.png", dx, dy); \
+ PNT(type, COLOR2(2, 11), ":/marine/" name "-black-orange.png", dx, dy); \
PNT(type, COLOR2(3, 1), ":/marine/" name "-red-white.png", dx, dy); \
PNT(type, COLOR2(3, 2), ":/marine/" name "-red-black.png", dx, dy); \
PNT(type, COLOR2(3, 4), ":/marine/" name "-red-green.png", dx, dy); \
@@ -48,14 +49,15 @@ using namespace Util;
PNT(type, COLOR2(4, 2), ":/marine/" name "-green-black.png", dx, dy); \
PNT(type, COLOR2(4, 3), ":/marine/" name "-green-red.png", dx, dy); \
PNT(type, COLOR2(6, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
- PNT(type, COLOR2(9, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
- PNT(type, COLOR2(11, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
+ PNT(type, COLOR2(8, 1), ":/marine/" name "-orange-white.png", dx, dy); \
+ PNT(type, COLOR2(9, 1), ":/marine/" name "-orange-white.png", dx, dy); \
+ PNT(type, COLOR2(11, 1), ":/marine/" name "-orange-white.png", dx, dy); \
PNT(type, COLOR2(6, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
- PNT(type, COLOR2(9, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
- PNT(type, COLOR2(11, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
+ PNT(type, COLOR2(9, 2), ":/marine/" name "-orange-black.png", dx, dy); \
+ PNT(type, COLOR2(11, 2), ":/marine/" name "-orange-black.png", dx, dy); \
PNT(type, COLOR3(1, 6, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
- PNT(type, COLOR3(1, 9, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
- PNT(type, COLOR3(1, 11, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
+ PNT(type, COLOR3(1, 9, 1), ":/marine/" name "-white-orange-white.png", dx, dy); \
+ PNT(type, COLOR3(1, 11, 1), ":/marine/" name "-white-orange-white.png", dx, dy); \
PNT(type, COLOR3(2, 1, 2), ":/marine/" name "-black-white-black.png", dx, dy); \
PNT(type, COLOR3(2, 3, 2), ":/marine/" name "-black-red-black.png", dx, dy); \
PNT(type, COLOR3(2, 6, 2), ":/marine/" name "-black-yellow-black.png", dx, dy); \
@@ -104,7 +106,19 @@ void Style::polygonStyle()
_polygons[SUBTYPE(DEPARE, 5)] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff)));
_polygons[SUBTYPE(DEPARE, 6)] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[TYPE(DMPGRD)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
- Qt::Dense3Pattern));
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 1)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 2)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 3)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 4)] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 5)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense5Pattern));
+ _polygons[SUBTYPE(DMPGRD, 6)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense5Pattern));
_polygons[TYPE(FAIRWY)] = Polygon(Qt::NoBrush, QPen(QColor(0x88, 0x88, 0x88),
1, Qt::DashDotDotLine));
_polygons[TYPE(OBSTRN)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 1.5,
@@ -116,10 +130,57 @@ void Style::polygonStyle()
_polygons[TYPE(HULKES)] = Polygon(QBrush(QColor(0x33, 0x33, 0x33)));
_polygons[TYPE(I_HULKES)] = Polygon(QBrush(QColor(0x33, 0x33, 0x33)));
_polygons[TYPE(DRYDOC)] = Polygon(QBrush(QColor(0x33, 0x33, 0x33)));
- _polygons[TYPE(SLCONS)] = Polygon(Qt::NoBrush,
- QPen(QColor(0x33, 0x33, 0x33), 1.5, Qt::DashLine));
- _polygons[TYPE(I_SLCONS)] = Polygon(Qt::NoBrush,
- QPen(QColor(0x33, 0x33, 0x33), 1.5, Qt::DashLine));
+ _polygons[TYPE(SLCONS)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 1)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64),
+ Qt::Dense4Pattern), QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 2)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64),
+ Qt::Dense4Pattern), QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _polygons[SUBTYPE(SLCONS, 3)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 4)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 5)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 6)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 7)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0),
+ 2, Qt::DashLine));
+ _polygons[SUBTYPE(SLCONS, 8)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64),
+ Qt::Dense4Pattern), QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 9)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64),
+ Qt::Dense4Pattern), QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 10)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 11)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 12)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _polygons[SUBTYPE(SLCONS, 13)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _polygons[SUBTYPE(SLCONS, 14)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64)),
+ QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 15)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2));
+ _polygons[SUBTYPE(SLCONS, 16)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0),
+ 2, Qt::DashLine));
+ _polygons[TYPE(I_SLCONS)] = _polygons[TYPE(SLCONS)];
+ _polygons[SUBTYPE(I_SLCONS, 1)] = _polygons[SUBTYPE(SLCONS, 1)];
+ _polygons[SUBTYPE(I_SLCONS, 2)] = _polygons[SUBTYPE(SLCONS, 2)];
+ _polygons[SUBTYPE(I_SLCONS, 3)] = _polygons[SUBTYPE(SLCONS, 3)];
+ _polygons[SUBTYPE(I_SLCONS, 4)] = _polygons[SUBTYPE(SLCONS, 4)];
+ _polygons[SUBTYPE(I_SLCONS, 5)] = _polygons[SUBTYPE(SLCONS, 5)];
+ _polygons[SUBTYPE(I_SLCONS, 6)] = _polygons[SUBTYPE(SLCONS, 6)];
+ _polygons[SUBTYPE(I_SLCONS, 7)] = _polygons[SUBTYPE(SLCONS, 7)];
+ _polygons[SUBTYPE(I_SLCONS, 8)] = _polygons[SUBTYPE(SLCONS, 8)];
+ _polygons[SUBTYPE(I_SLCONS, 9)] = _polygons[SUBTYPE(SLCONS, 9)];
+ _polygons[SUBTYPE(I_SLCONS, 10)] = _polygons[SUBTYPE(SLCONS, 10)];
+ _polygons[SUBTYPE(I_SLCONS, 11)] = _polygons[SUBTYPE(SLCONS, 11)];
+ _polygons[SUBTYPE(I_SLCONS, 12)] = _polygons[SUBTYPE(SLCONS, 12)];
+ _polygons[SUBTYPE(I_SLCONS, 13)] = _polygons[SUBTYPE(SLCONS, 13)];
+ _polygons[SUBTYPE(I_SLCONS, 14)] = _polygons[SUBTYPE(SLCONS, 14)];
+ _polygons[SUBTYPE(I_SLCONS, 15)] = _polygons[SUBTYPE(SLCONS, 15)];
+ _polygons[SUBTYPE(I_SLCONS, 16)] = _polygons[SUBTYPE(SLCONS, 16)];
+ _polygons[SUBTYPE(I_SLCONS, 19)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2));
_polygons[TYPE(LAKARE)] = Polygon(QBrush(QColor(0x9f, 0xc4, 0xe1)),
QPen(QColor(0, 0, 0), 1));
_polygons[TYPE(CANALS)] = Polygon(QBrush(QColor(0x9f, 0xc4, 0xe1)),
@@ -134,6 +195,7 @@ void Style::polygonStyle()
_polygons[TYPE(UNSARE)] = Polygon(QBrush(QColor(0x99, 0x99, 0x99)));
_polygons[SUBTYPE(RESARE, 1)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(RESARE, 2)] = Polygon(QImage(":/marine/noanchor-line.png"));
+ _polygons[SUBTYPE(RESARE, 3)] = Polygon(QImage(":/marine/nofishing-line.png"));
_polygons[SUBTYPE(RESARE, 4)] = Polygon(QImage(":/marine/nature-reserve-line.png"));
_polygons[SUBTYPE(RESARE, 5)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 6)] = Polygon(QImage(":/marine/sanctuary-line.png"));
@@ -151,6 +213,7 @@ void Style::polygonStyle()
_polygons[SUBTYPE(RESARE, 26)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)];
_polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)];
+ _polygons[SUBTYPE(I_RESARE, 3)] = _polygons[SUBTYPE(RESARE, 3)];
_polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)];
_polygons[SUBTYPE(I_RESARE, 5)] = _polygons[SUBTYPE(RESARE, 5)];
_polygons[SUBTYPE(I_RESARE, 6)] = _polygons[SUBTYPE(RESARE, 6)];
@@ -225,10 +288,14 @@ void Style::polygonStyle()
_polygons[SUBTYPE(I_BERTHS, 6)] = _polygons[TYPE(BERTHS)];
_polygons[TYPE(I_TRNBSN)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashLine));
- _polygons[TYPE(CONZNE)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
- 1, Qt::DashDotLine));
_polygons[TYPE(PILBOP)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashLine));
+ _polygons[TYPE(CONZNE)] = Polygon(
+ QImage(":/marine/seaward-limit-of-contiguous-zone.png"));
+ _polygons[TYPE(TESARE)] = Polygon(
+ QImage(":/marine/seaward-limit-of-territorial-sea.png"));
+ _polygons[SUBTYPE(ADMARE, 2)] = Polygon(
+ QImage(":/marine/international-maritime-boundary.png"));
_drawOrder
<< TYPE(LNDARE) << SUBTYPE(DEPARE, 0) << SUBTYPE(DEPARE, 1)
@@ -238,32 +305,46 @@ void Style::polygonStyle()
<< TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(LOKBSN) << TYPE(I_LOKBSN)
<< TYPE(BUAARE) << TYPE(BUISGL) << TYPE(SILTNK) << TYPE(AIRARE)
<< TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(TUNNEL) << 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(BERTHS) << TYPE(I_BERTHS)
- << SUBTYPE(I_BERTHS, 6) << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN)
- << TYPE(UWTROC) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1)
- << SUBTYPE(ACHARE, 2) << SUBTYPE(ACHARE, 3) << SUBTYPE(ACHARE, 4)
- << SUBTYPE(ACHARE, 5) << SUBTYPE(ACHARE, 6) << SUBTYPE(ACHARE, 7)
- << SUBTYPE(ACHARE, 8) << SUBTYPE(ACHARE, 9) << SUBTYPE(I_ACHARE, 1)
- << SUBTYPE(I_ACHARE, 2) << SUBTYPE(I_ACHARE, 3) << SUBTYPE(I_ACHARE, 4)
- << SUBTYPE(I_ACHARE, 5) << SUBTYPE(I_ACHARE, 6) << SUBTYPE(I_ACHARE, 7)
- << SUBTYPE(I_ACHARE, 8) << SUBTYPE(I_ACHARE, 9) << SUBTYPE(I_ACHARE, 10)
- << SUBTYPE(I_ACHARE, 11) << SUBTYPE(I_ACHARE, 12) << SUBTYPE(RESARE, 1)
- << SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
- << SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4) << SUBTYPE(RESARE, 5)
- << SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6)
- << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 8)
- << SUBTYPE(I_RESARE, 8) << SUBTYPE(RESARE, 9) << SUBTYPE(I_RESARE, 9)
- << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 14)
- << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17)
- << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23)
- << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) << SUBTYPE(I_RESARE, 25)
- << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) << TYPE(CBLARE)
- << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) << TYPE(PILBOP)
- << SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1) << SUBTYPE(MARCUL, 2)
- << SUBTYPE(MARCUL, 3) << TYPE(CONZNE);
+ << TYPE(SLCONS) << SUBTYPE(SLCONS, 1) << SUBTYPE(SLCONS, 2)
+ << SUBTYPE(SLCONS, 8) << SUBTYPE(SLCONS, 9) << SUBTYPE(SLCONS, 3)
+ << SUBTYPE(SLCONS, 4) << SUBTYPE(SLCONS, 5) << SUBTYPE(SLCONS, 6)
+ << SUBTYPE(SLCONS, 7) << SUBTYPE(SLCONS, 10) << SUBTYPE(SLCONS, 11)
+ << SUBTYPE(SLCONS, 12) << SUBTYPE(SLCONS, 13) << SUBTYPE(SLCONS, 14)
+ << SUBTYPE(SLCONS, 15) << SUBTYPE(SLCONS, 16) << TYPE(I_SLCONS)
+ << SUBTYPE(I_SLCONS, 1) << SUBTYPE(I_SLCONS, 2) << SUBTYPE(I_SLCONS, 3)
+ << SUBTYPE(I_SLCONS, 4) << SUBTYPE(I_SLCONS, 5) << SUBTYPE(I_SLCONS, 6)
+ << SUBTYPE(I_SLCONS, 7) << SUBTYPE(I_SLCONS, 8) << SUBTYPE(I_SLCONS, 9)
+ << SUBTYPE(I_SLCONS, 10) << SUBTYPE(I_SLCONS, 11) << SUBTYPE(I_SLCONS, 12)
+ << SUBTYPE(I_SLCONS, 13) << SUBTYPE(I_SLCONS, 14) << SUBTYPE(I_SLCONS, 15)
+ << SUBTYPE(I_SLCONS, 16) << SUBTYPE(I_SLCONS, 19) << 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(BERTHS)
+ << TYPE(I_BERTHS) << SUBTYPE(I_BERTHS, 6) << TYPE(DMPGRD)
+ << SUBTYPE(DMPGRD, 1) << SUBTYPE(DMPGRD, 2) << SUBTYPE(DMPGRD, 3)
+ << SUBTYPE(DMPGRD, 4) << SUBTYPE(DMPGRD, 5) << SUBTYPE(DMPGRD, 6)
+ << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC) << TYPE(DWRTPT)
+ << SUBTYPE(ACHARE, 1) << SUBTYPE(ACHARE, 2) << SUBTYPE(ACHARE, 3)
+ << SUBTYPE(ACHARE, 4) << SUBTYPE(ACHARE, 5) << SUBTYPE(ACHARE, 6)
+ << SUBTYPE(ACHARE, 7) << SUBTYPE(ACHARE, 8) << SUBTYPE(ACHARE, 9)
+ << SUBTYPE(I_ACHARE, 1) << SUBTYPE(I_ACHARE, 2) << SUBTYPE(I_ACHARE, 3)
+ << SUBTYPE(I_ACHARE, 4) << SUBTYPE(I_ACHARE, 5) << SUBTYPE(I_ACHARE, 6)
+ << SUBTYPE(I_ACHARE, 7) << SUBTYPE(I_ACHARE, 8) << SUBTYPE(I_ACHARE, 9)
+ << SUBTYPE(I_ACHARE, 10) << SUBTYPE(I_ACHARE, 11) << SUBTYPE(I_ACHARE, 12)
+ << SUBTYPE(RESARE, 1) << SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2)
+ << SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4)
+ << SUBTYPE(RESARE, 5) << SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6)
+ << SUBTYPE(I_RESARE, 6) << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7)
+ << SUBTYPE(RESARE, 8) << SUBTYPE(I_RESARE, 8) << SUBTYPE(RESARE, 9)
+ << SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12)
+ << SUBTYPE(RESARE, 14) << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17)
+ << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22)
+ << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25)
+ << SUBTYPE(I_RESARE, 25) << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26)
+ << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN)
+ << TYPE(PILBOP) << SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1)
+ << SUBTYPE(MARCUL, 2) << SUBTYPE(MARCUL, 3) << TYPE(CONZNE)
+ << TYPE(TESARE) << SUBTYPE(ADMARE, 2);
}
void Style::lineStyle(qreal ratio)
@@ -282,8 +363,33 @@ void Style::lineStyle(qreal ratio)
_lines[TYPE(PIPSOL)].setTextFontSize(Small);
_lines[TYPE(NAVLNE)] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine));
_lines[TYPE(COALNE)] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
- _lines[TYPE(SLCONS)] = Line(QPen(QColor(0, 0, 0), 2, Qt::SolidLine));
- _lines[TYPE(I_SLCONS)] = Line(QPen(QColor(0, 0, 0), 2, Qt::SolidLine));
+ _lines[TYPE(SLCONS)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 1)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 2)] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[SUBTYPE(SLCONS, 3)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 4)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 5)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 6)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 7)] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[SUBTYPE(SLCONS, 10)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 11)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[SUBTYPE(SLCONS, 12)] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[SUBTYPE(SLCONS, 13)] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[SUBTYPE(SLCONS, 15)] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[TYPE(I_SLCONS)] = _lines[TYPE(SLCONS)];
+ _lines[SUBTYPE(I_SLCONS, 1)] = _lines[SUBTYPE(SLCONS, 1)];
+ _lines[SUBTYPE(I_SLCONS, 2)] = _lines[SUBTYPE(SLCONS, 2)];
+ _lines[SUBTYPE(I_SLCONS, 3)] = _lines[SUBTYPE(SLCONS, 3)];
+ _lines[SUBTYPE(I_SLCONS, 4)] = _lines[SUBTYPE(SLCONS, 4)];
+ _lines[SUBTYPE(I_SLCONS, 5)] = _lines[SUBTYPE(SLCONS, 5)];
+ _lines[SUBTYPE(I_SLCONS, 6)] = _lines[SUBTYPE(SLCONS, 6)];
+ _lines[SUBTYPE(I_SLCONS, 7)] = _lines[SUBTYPE(SLCONS, 7)];
+ _lines[SUBTYPE(I_SLCONS, 10)] = _lines[SUBTYPE(SLCONS, 10)];
+ _lines[SUBTYPE(I_SLCONS, 11)] = _lines[SUBTYPE(SLCONS, 11)];
+ _lines[SUBTYPE(I_SLCONS, 12)] = _lines[SUBTYPE(SLCONS, 12)];
+ _lines[SUBTYPE(I_SLCONS, 13)] = _lines[SUBTYPE(SLCONS, 13)];
+ _lines[SUBTYPE(I_SLCONS, 15)] = _lines[SUBTYPE(SLCONS, 15)];
+ _lines[SUBTYPE(I_SLCONS, 19)] = Line(QPen(QColor(0, 0, 0), 2));
_lines[TYPE(PONTON)] = Line(QPen(QColor(0x33, 0x33, 0x33), 1, Qt::SolidLine));
_lines[TYPE(DYKCON)] = Line(QPen(QColor(0x33, 0x33, 0x33), 2, Qt::SolidLine));
_lines[TYPE(RIVERS)] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
@@ -305,6 +411,7 @@ void Style::lineStyle(qreal ratio)
Qt::SolidLine));
_lines[TYPE(I_WTWAXS)] = Line(QPen(QColor(0, 0, 0), 0, Qt::DashLine));
_lines[SUBTYPE(RECTRC, 1)] = Line(QPen(QColor(0, 0, 0), 0, Qt::SolidLine));
+ _lines[SUBTYPE(RECTRC, 1)].setTextFontSize(Small);
_lines[SUBTYPE(RECTRC, 2)] = Line(QPen(QColor(0, 0, 0), 0, Qt::DashLine));
_lines[SUBTYPE(RCRTCL, 1)] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 0,
Qt::SolidLine));
@@ -327,6 +434,8 @@ void Style::lineStyle(qreal ratio)
Qt::DashLine));
_lines[SUBTYPE(RDOCAL, 4)] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1,
Qt::DashLine));
+ _lines[TYPE(STSLNE)] = Line(
+ QImage(":/marine/straight-territorial-sea-baseline.png"));
}
void Style::pointStyle(qreal ratio)
@@ -458,6 +567,7 @@ void Style::pointStyle(qreal ratio)
_points[TYPE(PILBOP)] = Point(QImage(":/marine/boarding-place.png"));
_points[TYPE(SISTAT)] = Point(QImage(":/marine/pylon.png"));
_points[TYPE(SLCONS)] = Point(QImage(":/marine/construction.png"), Small);
+ _points[TYPE(I_SLCONS)] = Point(QImage(":/marine/construction.png"), Small);
_points[TYPE(CURENT)] = Point(QImage(":/marine/current.png"));
_points[SUBTYPE(WEDKLP, 0)] = Point(QImage(":/marine/kelp.png"));
_points[SUBTYPE(WEDKLP, 1)] = Point(QImage(":/marine/kelp.png"));
@@ -540,6 +650,15 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)];
_points[SUBTYPE(I_RESARE, 25)] = _points[SUBTYPE(RESARE, 25)];
_points[SUBTYPE(I_RESARE, 26)] = _points[SUBTYPE(RESARE, 26)];
+ _points[TYPE(DMPGRD)].setTextColor(QColor(0x5d, 0x5b, 0x59));
+ _points[TYPE(DMPGRD)].setHaloColor(QColor());
+ _points[SUBTYPE(DMPGRD, 1)] = _points[TYPE(DMPGRD)];
+ _points[SUBTYPE(DMPGRD, 2)] = _points[TYPE(DMPGRD)];
+ _points[SUBTYPE(DMPGRD, 3)] = _points[TYPE(DMPGRD)];
+ _points[SUBTYPE(DMPGRD, 4)].setTextColor(QColor(0xff, 0x40, 0x40));
+ _points[SUBTYPE(DMPGRD, 4)].setHaloColor(QColor());
+ _points[SUBTYPE(DMPGRD, 5)] = _points[TYPE(DMPGRD)];
+ _points[SUBTYPE(DMPGRD, 6)] = _points[TYPE(DMPGRD)];
_points[SUBTYPE(I_BUNSTA, 1)] = Point(svg2img(":/POI/fuel-11.svg", ratio),
Small);
diff --git a/src/map/IMG/mapdata.h b/src/map/IMG/mapdata.h
index 3920ef24..a9fc0eac 100644
--- a/src/map/IMG/mapdata.h
+++ b/src/map/IMG/mapdata.h
@@ -29,18 +29,25 @@ class MapData
{
public:
struct Poly {
- Poly() : oneway(false) {}
+ Poly() : flags(0) {}
+
+ enum Flags {
+ OneWay = 1,
+ Invert = 2,
+ Direction = 4,
+ Dashed = 8
+ };
/* QPointF insted of Coordinates for performance reasons (no need to
duplicate all the vectors for drawing). Note, that we do not want to
ll2xy() the points in the MapData class as this can not be done in
parallel. */
QVector points;
+ RectC boundingRect;
Label label;
Raster raster;
quint32 type;
- RectC boundingRect;
- bool oneway;
+ quint32 flags;
bool operator<(const Poly &other) const
{return type > other.type;}
@@ -50,7 +57,6 @@ public:
Point() : id(0), flags(0) {}
enum Flags {
- NoFlag = 0,
ClassLabel = 1,
};
diff --git a/src/map/IMG/netfile.cpp b/src/map/IMG/netfile.cpp
index e37b27fe..c54e0560 100644
--- a/src/map/IMG/netfile.cpp
+++ b/src/map/IMG/netfile.cpp
@@ -480,7 +480,7 @@ bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
if (lbl)
linkLabel(hdl, linkOffset, lbl, lblHdl, poly.label);
if ((linkInfo.flags >> 3) & 1)
- poly.oneway = true;
+ poly.flags |= MapData::Poly::OneWay;
lines->append(poly);
diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp
index cc8f9b69..732d7cd4 100644
--- a/src/map/IMG/rastertile.cpp
+++ b/src/map/IMG/rastertile.cpp
@@ -186,6 +186,21 @@ void RasterTile::drawPolygons(QPainter *painter,
}
}
+static quint32 lineType(quint32 type, quint32 flags)
+{
+ if (Style::isCartographicLine(type)) {
+ if (flags & MapData::Poly::Dashed)
+ return type | (flags & 0xFF000000) | 1<<20;
+ else
+ return type | (flags & 0xFF000000);
+ } else if (Style::isRecommendedRoute(type))
+ return (flags & MapData::Poly::Dashed) ? type | 1<<20 : type;
+ else if (flags & MapData::Poly::Direction)
+ return type | 2<<20;
+ else
+ return type;
+}
+
void RasterTile::drawLines(QPainter *painter,
const QList &lines) const
{
@@ -204,11 +219,15 @@ void RasterTile::drawLines(QPainter *painter,
for (int i = 0; i < lines.size(); i++) {
const MapData::Poly &poly = lines.at(i);
- const Style::Line &style = _data->style()->line(poly.type);
+ const Style::Line &style = _data->style()->line(
+ lineType(poly.type, poly.flags));
- if (!style.img().isNull())
- BitmapLine::draw(painter, poly.points, style.img());
- else if (style.foreground() != Qt::NoPen) {
+ if (!style.img().isNull()) {
+ if (poly.flags & MapData::Poly::Invert)
+ BitmapLine::drawR(painter, poly.points, style.img());
+ else
+ BitmapLine::draw(painter, poly.points, style.img());
+ } else if (style.foreground() != Qt::NoPen) {
painter->setPen(style.foreground());
painter->drawPolyline(poly.points);
}
@@ -383,7 +402,7 @@ void RasterTile::processStreetNames(const QList &lines,
? &style.text().color() : Style::isContourLine(poly.type)
? 0 : &textColor;
const QColor *hColor = Style::isContourLine(poly.type) ? 0 : &haloColor;
- const QImage *img = poly.oneway
+ const QImage *img = (poly.flags & MapData::Poly::OneWay)
? Style::isWaterLine(poly.type)
? &arrows[WATER] : &arrows[ROAD] : 0;
const QString *label = poly.label.text().isEmpty()
@@ -523,7 +542,8 @@ void RasterTile::processPoints(QList &points,
const MapData::Point &point = points.at(i);
const Style *style = _data->style();
const Style::Point &ps = style->point(Style::hasColorset(point.type)
- ? point.type | (point.flags & 0xFF000000) : point.type);
+ ? point.type | (point.flags & 0xFF000000)
+ : point.type | (point.flags & 0x00F00000));
bool poi = Style::isPOI(point.type);
bool sl = sectorLight(point.lights);
@@ -559,8 +579,6 @@ void RasterTile::processPoints(QList &points,
} else
delete item;
}
-
-
}
void RasterTile::fetchData(QList &polygons,
diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp
index 8baed229..829b99c0 100644
--- a/src/map/IMG/rgnfile.cpp
+++ b/src/map/IMG/rgnfile.cpp
@@ -244,6 +244,101 @@ bool RGNFile::readLabel(Handle &hdl, LBLFile *lbl, Handle &lblHdl,
return true;
}
+bool RGNFile::readLineStyle(Handle &hdl, quint8 flags, quint32 size,
+ MapData::Poly *line) const
+{
+ line->flags |= (flags & 0xf)<<24;
+
+ if (size == 1) {
+ quint32 val;
+
+ if (!readUInt8(hdl, val))
+ return false;
+
+ if (val & 3)
+ line->flags |= MapData::Poly::Dashed;
+ if ((val >> 3) & 3)
+ line->flags |= MapData::Poly::Direction;
+ if ((val >> 3) & 2)
+ line->flags |= MapData::Poly::Invert;
+
+ return true;
+ } else {
+ if ((flags >> 4) & 3)
+ line->flags |= MapData::Poly::Dashed;
+ return (!size);
+ }
+}
+
+bool RGNFile::readRecommendedRoute(Handle &hdl, quint8 flags, quint32 size,
+ MapData::Poly *line) const
+{
+ quint32 f2;
+
+ if (!(size >= 1 && readUInt8(hdl, f2)))
+ return false;
+ size--;
+
+ if ((flags >> 5) == 7) {
+ quint32 f3;
+ if (!(size >= 1 && readUInt8(hdl, f3)))
+ return false;
+ size--;
+
+ if (f3 & 1) {
+ quint32 v1;
+ if (!(size >= 1 && readUInt8(hdl, v1)))
+ return false;
+ size--;
+ if (v1 & 1) {
+ quint32 v2;
+ if (!(size >= 1 && readUInt8(hdl, v2)))
+ return false;
+ size--;
+ }
+ }
+ if (f3 & 2) {
+ quint32 angle;
+ if (!(size >= 2 && readUInt16(hdl, angle)))
+ return false;
+ size -= 2;
+ line->label = Label(QString::number(angle / 10.0) + QChar(0x00B0));
+ }
+ if (f3 & 4) {
+ quint32 v;
+ if (!(size >= 1 && readUInt8(hdl, v)))
+ return false;
+ size--;
+
+ if ((v >> 4) & 3) {
+ line->flags |= MapData::Poly::Dashed;
+ line->label = Label();
+ }
+ }
+ } else {
+ if ((f2 & 0xe)) {
+ quint32 angle;
+ if (!(size >= 2 && readUInt16(hdl, angle)))
+ return false;
+ size -= 2;
+ line->label = Label(QString::number(angle / 10.0) + QChar(0x00B0));
+ } else if (f2 & 0x70) {
+ quint32 v1;
+ if (!(size >= 1 && readUInt8(hdl, v1)))
+ return false;
+ size--;
+ if (v1 & 1) {
+ quint32 v2;
+ if (!(size >= 1 && readUInt8(hdl, v2)))
+ return false;
+ size--;
+ }
+ }
+ }
+
+ return (size == 0);
+}
+
bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType,
void *object, LBLFile *lbl, Handle &lblHdl) const
{
@@ -251,6 +346,8 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType,
quint32 rs = 0;
MapData::Poly *poly = (segmentType == Polygon)
? (MapData::Poly *) object : 0;
+ MapData::Poly *line = (segmentType == Line)
+ ? (MapData::Poly *) object : 0;
MapData::Point *point = (segmentType == Point)
? (MapData::Point *) object : 0;
@@ -277,9 +374,9 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType,
if (poly && Style::isRaster(poly->type))
readRasterInfo(hdl, lbl, rs, poly);
+
if (point && !Style::isMarinePoint(point->type))
readLabel(hdl, lbl, lblHdl, flags, rs, point);
-
if (point && Style::isDepthPoint(point->type))
readDepthInfo(hdl, flags, rs, point);
if (point && Style::isObstructionPoint(point->type))
@@ -288,6 +385,13 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType,
readBuoyInfo(hdl, flags, rs, point);
if (point && Style::isLight(point->type))
readLightInfo(hdl, flags, rs, point);
+ if (point && Style::isLabelPoint(point->type))
+ point->flags |= (flags & 0xf)<<20;
+
+ if (line && Style::isStyledLine(line->type))
+ readLineStyle(hdl, flags, rs, line);
+ if (line && Style::isRecommendedRoute(line->type))
+ readRecommendedRoute(hdl, flags, rs, line);
return seek(hdl, off + rs);
}
@@ -597,8 +701,7 @@ bool RGNFile::polyObjects(Handle &hdl, const SubDiv *subdiv,
poly.type = (segmentType == Polygon)
? ((quint32)(type & 0x7F)) << 8 : ((quint32)(type & 0x3F)) << 8;
if (segmentType == Line && type & 0x40)
- poly.oneway = true;
-
+ poly.flags |= MapData::Poly::OneWay;
QPoint pos(subdiv->lon() + LS(lon, 24-subdiv->bits()),
subdiv->lat() + LS(lat, 24-subdiv->bits()));
diff --git a/src/map/IMG/rgnfile.h b/src/map/IMG/rgnfile.h
index 47558dc8..5016e098 100644
--- a/src/map/IMG/rgnfile.h
+++ b/src/map/IMG/rgnfile.h
@@ -69,6 +69,10 @@ private:
MapData::Point *point) const;
bool readLightInfo(Handle &hdl, quint8 flags, quint32 size,
MapData::Point *point) const;
+ bool readLineStyle(Handle &hdl, quint8 flags, quint32 size,
+ MapData::Poly *line) const;
+ bool readRecommendedRoute(Handle &hdl, quint8 flags, quint32 size,
+ MapData::Poly *line) const;
bool readLabel(Handle &hdl, LBLFile *lbl, Handle &lblHdl,
quint8 flags, quint32 size, MapData::Point *point) const;
bool readLclNavaid(Handle &hdl, quint32 size,
diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp
index 6e741aac..0c492014 100644
--- a/src/map/IMG/style.cpp
+++ b/src/map/IMG/style.cpp
@@ -7,8 +7,8 @@
using namespace IMG;
using namespace Util;
-#define PNT(type, color, img, dx, dy) \
- _points[(type) | (color)<<24] = Point(QImage(img), QPoint(dx, dy));
+#define PNT(type, index, img, dx, dy) \
+ _points[(type) | (index)<<24] = Point(QImage(img), QPoint(dx, dy));
#define COLORSET(type, name, dx, dy) \
PNT(type, 0, ":/marine/" name ".png", dx, dy); \
@@ -351,13 +351,13 @@ void Style::defaultPolygonStyle()
_polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[0x10407] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
- Qt::Dense3Pattern));
+ Qt::Dense5Pattern));
+ _polygons[0x10408] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
+ Qt::Dense5Pattern));
_polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
Qt::FDiagPattern));
_polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
Qt::FDiagPattern));
- _polygons[0x10504] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
- Qt::FDiagPattern));
_polygons[0x10601] = Polygon(QBrush(QColor(0xaa, 0xaa, 0xaa)));
_polygons[0x1060a] = Polygon(QBrush(QColor(0xfc, 0xb4, 0xfc)));
_polygons[0x10614] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
@@ -366,7 +366,7 @@ void Style::defaultPolygonStyle()
_drawOrder
<< TYPE(0x4b) << 0x10d01 << 0x10106 << 0x10104 << TYPE(0x4a) << 0x10614
<< 0x10101 << 0x10102 << 0x10301 << 0x10302 << 0x10303 << 0x10304
- << 0x10305 << 0x10306 << 0x10307 << 0x10308 << 0x10601 << 0x10105
+ << 0x10305 << 0x10306 << 0x10307 << 0x10308 << 0x10601
<< TYPE(0x01) << 0x10800 << TYPE(0x02) << 0x10801 << TYPE(0x03) << 0x10802
<< TYPE(0x17) << 0x10a04 << TYPE(0x18) << 0x1090c << TYPE(0x1a) << 0x1090e
<< TYPE(0x28) << 0x10b01 << TYPE(0x32) << 0x10b02 << TYPE(0x3c) << 0x10b03
@@ -381,10 +381,11 @@ void Style::defaultPolygonStyle()
<< TYPE(0x04) << 0x10901 << TYPE(0x05) << 0x10902 << TYPE(0x06) << 0x10903
<< TYPE(0x07) << 0x10904 << TYPE(0x08) << 0x10905 << TYPE(0x09) << 0x10906
<< TYPE(0x0a) << 0x10907 << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909
- << TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f)
- << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d
- << TYPE(0x13) << 0x10900 << 0x10613 << 0x10407 << 0x10409 << 0x10503
- << 0x10504 << 0x1060a;
+ << TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b
+ << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12)
+ << TYPE(0x19) << 0x1090d << TYPE(0x13) << 0x10900
+ << 0x10613 /*raster*/ << 0x1060a << 0x10407 << 0x10408 << 0x10409
+ << 0x10503 << 0x10105;
}
void Style::defaultLineStyle(qreal ratio)
@@ -489,28 +490,103 @@ void Style::defaultLineStyle(qreal ratio)
_lines[0x10106] = Line(QImage(":/marine/cable-line.png"));
_lines[0x10107] = Line(QPen(QColor(0xa5, 0x81, 0x40), 3, Qt::SolidLine));
_lines[0x10108] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
+ _lines[0x110108] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine));
+
_lines[0x10301] = Line(QPen(QColor(0x0e, 0x10, 0x87), 1, Qt::SolidLine));
_lines[0x10307] = Line(QPen(QColor(0x05, 0x62, 0x0e), 1, Qt::SolidLine));
_lines[0x10309] = Line(QPen(QColor(0x0e, 0x10, 0x87), 1, Qt::SolidLine));
+
_lines[0x10401] = Line(QImage(":/marine/cable.png"));
_lines[0x10402] = Line(QImage(":/marine/pipeline.png"));
- _lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png"));
- _lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png"));
- _lines[0x10406] = Line(QImage(":/marine/cable-area-line.png"));
+ _lines[0x10403] = Line(QPen(QColor(0, 0, 0), 2, Qt::DotLine));
+ _lines[0x10404] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine));
+ _lines[0x210404] = Line(QImage(":/marine/fishing-farm-line.png"));
+ _lines[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210405] = Line(QImage(":/marine/pipeline-area-line.png"));
+ _lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210406] = Line(QImage(":/marine/cable-area-line.png"));
_lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine));
+ _lines[0x210407] = Line(QImage(":/marine/dumping-ground-line.png"));
+ _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
+ _lines[0x210408] = Line(QImage(":/marine/minefield-line.png"));
_lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine));
- _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png"));
- _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png"));
+ _lines[0x210409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine));
+ _lines[0x1040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[0x21040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
+ _lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2));
+ _lines[0x21040c] = Line(QPen(QColor(0, 0, 0), 2));
+
+ _lines[0x10501] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210501] = Line(QImage(":/marine/noanchor-line.png"));
+ _lines[0x10502] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210502] = Line(QImage(":/marine/nofishing-line.png"));
+ _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210503] = Line(QImage(":/marine/entry-prohibited-line.png"));
_lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
- _lines[0x10505] = Line(QImage(":/marine/safety-zone-line.png"));
- _lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png"));
- _lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png"));
- _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
- _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DashDotLine));
- _lines[0x10606] = Line(QImage(":/marine/anchor-line.png"));
+ _lines[0x210504] = Line(QImage(":/marine/entry-prohibited-line.png"));
+ _lines[0x10505] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210505] = Line(QImage(":/marine/noanchor-line.png"));
+ _lines[0x10506] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine));
+ _lines[0x210506] = Line(QImage(":/marine/nature-reserve-line.png"));
+ _lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210507] = Line(QImage(":/marine/safety-zone-line.png"));
+ _lines[0x10508] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
+ _lines[0x210508] = Line(QImage(":/marine/minefield-line.png"));
+
+ _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1));
+ _lines[0x110601] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine));
+ _lines[0x10601 | 1<<24] = Line(QPen(QColor(0, 0x90, 0xfc), 1));
+ _lines[0x110601 | 1<<24] = Line(QPen(QColor(0, 0x90, 0xfc), 1, Qt::DashLine));
+ _lines[0x10601 | 2<<24] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1));
+ _lines[0x110601 | 2<<24] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine));
+ _lines[0x10601 | 3<<24] = Line(QPen(QColor(0xa7, 0xf1, 0xfc), 1));
+ _lines[0x110601 | 3<<24] = Line(QPen(QColor(0xa7, 0xf1, 0xfc), 1, Qt::DashLine));
+ _lines[0x10601 | 4<<24] = Line(QPen(QColor(0xff, 0x40, 0x40), 1));
+ _lines[0x110601 | 4<<24] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
+ _lines[0x10601 | 5<<24] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1));
+ _lines[0x110601 | 5<<24] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x10601 | 6<<24] = Line(QPen(QColor(0xfc, 0xe0, 0x1f), 1));
+ _lines[0x110601 | 6<<24] = Line(QPen(QColor(0xfc, 0xe0, 0x1f), 1, Qt::DashLine));
+ _lines[0x10601 | 7<<24] = Line(QPen(QColor(0xfc, 0x79, 0x1e), 1));
+ _lines[0x110601 | 7<<24] = Line(QPen(QColor(0xfc, 0x79, 0x1e), 1, Qt::DashLine));
+ _lines[0x10601 | 8<<24] = Line(QPen(QColor(0x40, 0x40, 0x40), 1));
+ _lines[0x110601 | 8<<24] = Line(QPen(QColor(0x40, 0x40, 0x40), 1, Qt::DashLine));
+ _lines[0x10601 | 9<<24] = Line(QPen(QColor(0x84, 0xe6, 0xfc), 1));
+ _lines[0x110601 | 9<<24] = Line(QPen(QColor(0x84, 0xe6, 0xfc), 1, Qt::DashLine));
+ _lines[0x10601 | 10<<24] = Line(QPen(QColor(0x83, 0x53, 0x15), 1));
+ _lines[0x110601 | 10<<24] = Line(QPen(QColor(0x83, 0x53, 0x15), 1, Qt::DashLine));
+ _lines[0x10601 | 11<<24] = Line(QPen(QColor(0xd2, 0xfc, 0xfc), 1));
+ _lines[0x110601 | 11<<24] = Line(QPen(QColor(0xd2, 0xfc, 0xfc), 1, Qt::DashLine));
+ _lines[0x10601 | 12<<24] = Line(QPen(QColor(0xc5, 0xf1, 0xc2), 1));
+ _lines[0x110601 | 12<<24] = Line(QPen(QColor(0xc5, 0xf1, 0xc2), 1, Qt::DashLine));
+ _lines[0x10601 | 13<<24] = Line(QPen(QColor(0xfc, 0xc6, 0xfc), 1));
+ _lines[0x110601 | 13<<24] = Line(QPen(QColor(0xfc, 0xc6, 0xfc), 1, Qt::DashLine));
+ _lines[0x10601 | 14<<24] = Line(QPen(QColor(0xe2, 0xdc, 0xa9), 1));
+ _lines[0x110601 | 14<<24] = Line(QPen(QColor(0xe2, 0xdc, 0xa9), 1, Qt::DashLine));
+ _lines[0x10601 | 15<<24] = Line(QPen(QColor(0xcd, 0xcd, 0xcd), 1));
+ _lines[0x110601 | 15<<24] = Line(QPen(QColor(0xcd, 0xcd, 0xcd), 1, Qt::DashLine));
+ _lines[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2));
+ _lines[0x210602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2));
+ _lines[0x10603] = Line(QImage(":/marine/international-maritime-boundary.png"));
+ _lines[0x210603] = Line(QImage(":/marine/international-maritime-boundary.png"));
+ _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1));
+ _lines[0x210604] = Line(QImage(":/marine/straight-territorial-sea-baseline.png"));
+ _lines[0x10605] = Line(QImage(":/marine/seaward-limit-of-territorial-sea.png"));
+ _lines[0x210605] = Line(QImage(":/marine/seaward-limit-of-territorial-sea.png"));
+ _lines[0x10606] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210606] = Line(QImage(":/marine/anchor-line.png"));
+ _lines[0x10608] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x210608] = Line(QImage(":/marine/fishing-line.png"));
+ _lines[0x1060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine));
+ _lines[0x21060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine));
_lines[0x1060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine));
+ _lines[0x21060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine));
_lines[0x1060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
+ _lines[0x21060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
+ _lines[0x1060e] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
+ _lines[0x21060e] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
_lines[0x10611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
+ _lines[0x210611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
}
void Style::defaultPointStyle(qreal ratio)
@@ -790,6 +866,8 @@ void Style::defaultPointStyle(qreal ratio)
COLORSET(0x10214, "beacon", 0, -8);
COLORSET(0x10215, "beacon", 0, -8);
_points[0x10216] = Point(QImage(":/marine/mooring-buoy.png"), QPoint(0, -5));
+ _points[0x10217] = Point(QImage(":/marine/pylon.png"));
+ _points[0x10218] = Point(QImage(":/marine/pylon.png"));
_points[0x10304] = Point(QImage(":/marine/building.png"));
_points[0x10305] = Point(QImage(":/marine/chimney.png"), QPoint(0, -11));
@@ -803,15 +881,35 @@ void Style::defaultPointStyle(qreal ratio)
_points[0x10401] = Point(QImage(":/marine/obstruction.png"));
_points[0x10402] = Point(QImage(":/marine/wreck.png"));
_points[0x10403] = Point(QImage(":/marine/wreck-exposed.png"), QPoint(0, -4));
+ _points[0x10405] = Point(QImage(":/marine/foul.png"));
_points[0x10408] = Point(QImage(":/marine/obstruction-covers.png"));
+ _points[0x10409] = Point(QImage(":/marine/fishing-farm.png"));
_points[0x1040a] = Point(QImage(":/marine/rock-dangerous.png"));
_points[0x1040c] = Point(QImage(":/marine/rock-exposed.png"));
+ _points[0x10500] = Point(Small, QColor(0, 0, 0));
+ _points[0x10500 | 1<<20] = Point(Small, QColor(0, 0x90, 0xfc));
+ _points[0x10500 | 2<<20] = Point(Small, QColor(0x30, 0xa0, 0x1b));
+ _points[0x10500 | 3<<20] = Point(Small, QColor(0xa7, 0xf1, 0xfc));
+ _points[0x10500 | 4<<20] = Point(Small, QColor(0xff, 0x40, 0x40));
+ _points[0x10500 | 5<<20] = Point(Small, QColor(0xe7, 0x28, 0xe7));
+ _points[0x10500 | 6<<20] = Point(Small, QColor(0xfc, 0xe0, 0x1f));
+ _points[0x10500 | 7<<20] = Point(Small, QColor(0xfc, 0x79, 0x1e));
+ _points[0x10500 | 8<<20] = Point(Small, QColor(0x40, 0x40, 0x40));
+ _points[0x10500 | 9<<20] = Point(Small, QColor(0x84, 0xe6, 0xfc));
+ _points[0x10500 | 10<<20] = Point(Small, QColor(0x83, 0x53, 0x15));
+ _points[0x10500 | 11<<20] = Point(Small, QColor(0xd2, 0xfc, 0xfc));
+ _points[0x10500 | 12<<20] = Point(Small, QColor(0xc5, 0xf1, 0xc2));
+ _points[0x10500 | 13<<20] = Point(Small, QColor(0xfc, 0xc6, 0xfc));
+ _points[0x10500 | 14<<20] = Point(Small, QColor(0xe2, 0xdc, 0xa9));
+ _points[0x10500 | 15<<20] = Point(Small, QColor(0xcd, 0xcd, 0xcd));
+
_points[0x10701] = Point(QImage(":/marine/anchorage.png"));
_points[0x10702] = Point(QImage(":/marine/boarding-place.png"));
_points[0x10703] = Point(QImage(":/marine/yacht-harbor.png"));
_points[0x10704] = Point(QImage(":/marine/pile.png"));
_points[0x10705] = Point(QImage(":/marine/anchoring-prohibited.png"));
+ _points[0x10708] = Point(QImage(":/marine/radio-call-garmin.png"));
_points[0x1070a] = Point(QImage(":/marine/rescue-station.png"));
_points[0x1070b] = Point(QImage(":/marine/fishing-harbor.png"));
}
diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h
index 5144d9db..93ed37bb 100644
--- a/src/map/IMG/style.h
+++ b/src/map/IMG/style.h
@@ -142,6 +142,8 @@ public:
{return (type >= 0x1400 && type <= 0x153f);}
static bool isState(quint32 type)
{return (type == TYPE(0x1e));}
+ static bool isMarina(quint32 type)
+ {return type == 0x10703;}
static bool isRaster(quint32 type)
{return (type == 0x10613);}
static bool isDepthPoint(quint32 type)
@@ -152,12 +154,19 @@ public:
{return (type >= 0x10200 && type < 0x10300);}
static bool isLight(quint32 type)
{return (type >= 0x10100 && type < 0x10200);}
+ static bool isLabelPoint(quint32 type)
+ {return type == 0x10500;}
static bool isMarinePoint(quint32 type)
{return type >= 0x10100 && type < 0x10a00;}
- static bool isMarina(quint32 type)
- {return type == 0x10703;}
+ static bool isStyledLine(quint32 type)
+ {return type >= 0x10400 && type < 0x10700;}
+ static bool isCartographicLine(quint32 type)
+ {return type == 0x10601;}
+ static bool isRecommendedRoute(quint32 type)
+ {return type == 0x10108;}
+
static bool hasColorset(quint32 type)
- {return (isBuoy(type) && !(type == 0x1020d || type == 0x10216));}
+ {return (isBuoy(type) && !(type == 0x1020d || type >= 0x10216));}
static QColor color(Light::Color c);
diff --git a/src/map/bitmapline.cpp b/src/map/bitmapline.cpp
index 49420510..118364db 100644
--- a/src/map/bitmapline.cpp
+++ b/src/map/bitmapline.cpp
@@ -53,6 +53,26 @@ void BitmapLine::draw(QPainter *painter, const QPolygonF &line,
}
}
+void BitmapLine::drawR(QPainter *painter, const QPolygonF &line,
+ const QImage &img)
+{
+ int offset = 0;
+
+ for (int i = line.size() - 1; i > 0; i--) {
+ QLineF segment(line.at(i).x(), line.at(i).y(), line.at(i-1).x(),
+ line.at(i-1).y());
+ int len = qCeil(segment.length() * img.devicePixelRatio());
+
+ painter->save();
+ painter->translate(segment.p1());
+ painter->rotate(-segment.angle());
+ painter->drawImage(0.0, -img.height()/2.0, img2line(img, len, offset));
+ painter->restore();
+
+ offset = (len + offset) % img.width();
+ }
+}
+
void BitmapLine::draw(QPainter *painter, const QVector &lines,
const QImage &img)
{
diff --git a/src/map/bitmapline.h b/src/map/bitmapline.h
index fcaef143..520117a2 100644
--- a/src/map/bitmapline.h
+++ b/src/map/bitmapline.h
@@ -11,6 +11,7 @@ class QPainterPath;
namespace BitmapLine
{
void draw(QPainter *painter, const QPolygonF &line, const QImage &img);
+ void drawR(QPainter *painter, const QPolygonF &line, const QImage &img);
void draw(QPainter *painter, const QVector &lines,
const QImage &img);
void draw(QPainter *painter, const QPainterPath &line, const QImage &img);
diff --git a/src/map/textpointitem.cpp b/src/map/textpointitem.cpp
index d5986139..19514440 100644
--- a/src/map/textpointitem.cpp
+++ b/src/map/textpointitem.cpp
@@ -8,7 +8,7 @@
#define FLAGS (Qt::AlignCenter | Qt::TextWordWrap | Qt::TextDontClip)
-#define MAX_TEXT_WIDTH 8
+#define MAX_TEXT_WIDTH 10
#define MIN_BOX_WIDTH 2