From 16d5e656bf7b752a40ec85f8eaf074626bf51490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 8 May 2025 15:31:07 +0200 Subject: [PATCH 01/35] Version++ --- .appveyor.yml | 2 +- gpxsee.pro | 2 +- pkg/windows/gpxsee64.nsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/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" From e43c4b44f453c915ba813511f0b3096dfe88998d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 8 May 2025 15:31:36 +0200 Subject: [PATCH 02/35] Also show the depths for underwater rocks --- src/map/ENC/mapdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 1819f66c..f6004cdf 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -447,7 +447,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); From 73ba18135605f93a329920bb39649df860ceb5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 9 May 2025 22:29:27 +0200 Subject: [PATCH 03/35] Cosmetics --- src/map/IMG/rastertile.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index cc8f9b69..ccaadd3c 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -559,8 +559,6 @@ void RasterTile::processPoints(QList &points, } else delete item; } - - } void RasterTile::fetchData(QList &polygons, From dea0e019a1a2d7a5591ba135a5ee7ee00bfbd859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 9 May 2025 22:58:18 +0200 Subject: [PATCH 04/35] IMG marine style enhancements --- src/map/IMG/style.cpp | 8 +++++--- src/map/IMG/style.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 6e741aac..dc983cb8 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -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 << 0x1060a << 0x10105 << 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 @@ -383,8 +383,7 @@ void Style::defaultPolygonStyle() << 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(0x13) << 0x10900 << 0x10407 << 0x10409 << 0x10503 << 0x10504; } void Style::defaultLineStyle(qreal ratio) @@ -790,6 +789,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)); @@ -804,6 +805,7 @@ void Style::defaultPointStyle(qreal ratio) _points[0x10402] = Point(QImage(":/marine/wreck.png")); _points[0x10403] = Point(QImage(":/marine/wreck-exposed.png"), QPoint(0, -4)); _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")); diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 5144d9db..ff1efbfb 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -157,7 +157,7 @@ public: static bool isMarina(quint32 type) {return type == 0x10703;} 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); From 42837bc2ca60d19c8434909127f2b42b0c2796dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 06:10:33 +0200 Subject: [PATCH 05/35] Fixed marine polygons draw order --- src/map/IMG/style.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index dc983cb8..2dbb81ef 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -356,8 +356,6 @@ void Style::defaultPolygonStyle() 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 +364,7 @@ void Style::defaultPolygonStyle() _drawOrder << TYPE(0x4b) << 0x10d01 << 0x10106 << 0x10104 << TYPE(0x4a) << 0x10614 << 0x10101 << 0x10102 << 0x10301 << 0x10302 << 0x10303 << 0x10304 - << 0x10305 << 0x10306 << 0x10307 << 0x10308 << 0x10601 << 0x1060a << 0x10105 + << 0x10305 << 0x10306 << 0x10307 << 0x10308 << 0x10601 << 0x1060a << 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,9 +379,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 << 0x10407 << 0x10409 << 0x10503 << 0x10504; + << 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 << 0x10409 << 0x10503 + << 0x10105; } void Style::defaultLineStyle(qreal ratio) From d95cc654fc52269409e9de0a39c59a2cc221e39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 09:11:32 +0200 Subject: [PATCH 06/35] Fishing-prohibited areas --- gpxsee.qrc | 1 + icons/map/marine/noanchor-line.png | Bin 305 -> 318 bytes icons/map/marine/nofishing-line.png | Bin 0 -> 354 bytes src/map/ENC/mapdata.cpp | 3 +++ src/map/ENC/style.cpp | 2 ++ src/map/IMG/style.cpp | 1 + 6 files changed, 7 insertions(+) create mode 100644 icons/map/marine/nofishing-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 652940ec..7ea07373 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -311,6 +311,7 @@ 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 diff --git a/icons/map/marine/noanchor-line.png b/icons/map/marine/noanchor-line.png index c50af80acce3add4183124d2a32d9a77eb26a76b..9dbc52dd74f55f99a8e73415abf963ab6312ba92 100644 GIT binary patch delta 192 zcmdnUw2x_mI2R`e8v_G_qL|N~iHgPbQ$1ZALp08BoovY0Y{281`{K&noz}+FKd44j zt6hsZG(F+nxj*L{?7Wp7TNIW)@eW&J@zcLASx}HOcY(|coqErenmjFyt_cPq)fX> zZ*8#;8_nL^?_DPP`-u_Xn%&#a9d%puL`Lt0f5!29$1gWCFfcH9y85}Sb4q9e0EB^7 AGXMYp delta 179 zcmdnTw2^6oI2Sty8v_G_w2bbViHgPb9iA?ZAsXk`PBi3dFyL_&E-flAEB_|+UufOD zlUt{sP@Qvk?te)YJ+7@9AurkkI9}GP#6Jm=X!2HR^1E=kPEc^oy#5}|q+h#8~p1fhR-{r~Aoi6R?Z{9C0w1(qV=>K&erzWQ9L>^Exo4?KT na&NAjd8GLIU|{fc^>bP0l+XkK{#H+T diff --git a/icons/map/marine/nofishing-line.png b/icons/map/marine/nofishing-line.png new file mode 100644 index 0000000000000000000000000000000000000000..d07e1be2ce26aa202d17ac748cd86aa15ae76be5 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0y~yU{GOTVBq9nV_;y2GU_W}U|?V@4sv&5ym?Zmo`HdZ zCEd~2k%3`jKlh(RRt5$Jg=CK)Uj~LMH3o);76yi23=9knFBlj~4Hy_+B``2p&0t^< zFPO6{(1wA5fi20~-G#w`VF80Qcm4EIkUa$+k;M!Qyw^dP(Me-=1p@=aPEQxd5R21C zLp=Eo8Su>6@Rj+;nZ5QO)qm}%QL=w{uJQ=GLxLV>*R3TNE_F>@+JH>8Y#QZK zft|C6oq<1}A?8hlvSZ%L7jw3Eq!<>wIuP8nD#q$dkDz2q;L zl5K2iI5lt55!FwZjK7%H_smc~e}2x?|COBozVh#7c(8B&QyIMn3m6y}7(8A5T-G@y GGywqDXM%nJ literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index f6004cdf..fa0f9960 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -199,6 +199,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 +324,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 diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index ea39fd16..60e4d6e5 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -134,6 +134,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 +152,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)]; diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 2dbb81ef..e511b15f 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -499,6 +499,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); + _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); _lines[0x10503] = 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")); From 77d4cd0a6eb2fa6d0e8a25499463c7fe486d8a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 09:19:01 +0200 Subject: [PATCH 07/35] Removed duplicit entry --- src/map/IMG/style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index e511b15f..100aeff3 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -364,7 +364,7 @@ void Style::defaultPolygonStyle() _drawOrder << TYPE(0x4b) << 0x10d01 << 0x10106 << 0x10104 << TYPE(0x4a) << 0x10614 << 0x10101 << 0x10102 << 0x10301 << 0x10302 << 0x10303 << 0x10304 - << 0x10305 << 0x10306 << 0x10307 << 0x10308 << 0x10601 << 0x1060a + << 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 From 535f4c075266aa09d092fc904b846d381e105cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 09:45:14 +0200 Subject: [PATCH 08/35] Use a better imge for the noanchor/nofishing lines --- src/map/IMG/style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 100aeff3..c222b98f 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -502,7 +502,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); _lines[0x10503] = 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[0x10505] = Line(QImage(":/marine/noanchor-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)); From 4d33631844e2601c2df34cbeccd7f18ec22977c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 14:27:51 +0200 Subject: [PATCH 09/35] Render marine lines with the propper direction --- src/map/IMG/mapdata.h | 10 +++++++--- src/map/IMG/netfile.cpp | 2 +- src/map/IMG/rastertile.cpp | 11 +++++++---- src/map/IMG/rgnfile.cpp | 24 ++++++++++++++++++++++-- src/map/IMG/rgnfile.h | 1 + src/map/IMG/style.h | 2 ++ src/map/bitmapline.cpp | 20 ++++++++++++++++++++ src/map/bitmapline.h | 1 + 8 files changed, 61 insertions(+), 10 deletions(-) diff --git a/src/map/IMG/mapdata.h b/src/map/IMG/mapdata.h index 3920ef24..12c2c5e4 100644 --- a/src/map/IMG/mapdata.h +++ b/src/map/IMG/mapdata.h @@ -29,7 +29,12 @@ class MapData { public: struct Poly { - Poly() : oneway(false) {} + Poly() : flags(0) {} + + enum Flags { + OneWay = 1, + Invert = 2 + }; /* QPointF insted of Coordinates for performance reasons (no need to duplicate all the vectors for drawing). Note, that we do not want to @@ -40,7 +45,7 @@ public: Raster raster; quint32 type; RectC boundingRect; - bool oneway; + quint32 flags; bool operator<(const Poly &other) const {return type > other.type;} @@ -50,7 +55,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 ccaadd3c..00f5882d 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -206,9 +206,12 @@ void RasterTile::drawLines(QPainter *painter, const MapData::Poly &poly = lines.at(i); const Style::Line &style = _data->style()->line(poly.type); - 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 +386,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() diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 8baed229..399d1db8 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -244,6 +244,22 @@ bool RGNFile::readLabel(Handle &hdl, LBLFile *lbl, Handle &lblHdl, return true; } +bool RGNFile::readLineInfo(Handle &hdl, quint32 size, MapData::Poly *line) const +{ + if (size == 1) { + quint32 val; + + if (!readUInt8(hdl, val)) + return false; + + if (((val >> 3) & 3) & 2) + line->flags |= MapData::Poly::Invert; + + return true; + } else + return (!size); +} + bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, void *object, LBLFile *lbl, Handle &lblHdl) const { @@ -251,6 +267,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; @@ -289,6 +307,9 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, if (point && Style::isLight(point->type)) readLightInfo(hdl, flags, rs, point); + if (line && Style::isMarineLine(line->type)) + readLineInfo(hdl, rs, line); + return seek(hdl, off + rs); } @@ -597,8 +618,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..76ed48cb 100644 --- a/src/map/IMG/rgnfile.h +++ b/src/map/IMG/rgnfile.h @@ -69,6 +69,7 @@ private: MapData::Point *point) const; bool readLightInfo(Handle &hdl, quint8 flags, quint32 size, MapData::Point *point) const; + bool readLineInfo(Handle &hdl, 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.h b/src/map/IMG/style.h index ff1efbfb..57f8a18b 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -154,6 +154,8 @@ public: {return (type >= 0x10100 && type < 0x10200);} static bool isMarinePoint(quint32 type) {return type >= 0x10100 && type < 0x10a00;} + static bool isMarineLine(quint32 type) + {return type >= 0x10400 && type < 0x10700;} static bool isMarina(quint32 type) {return type == 0x10703;} static bool hasColorset(quint32 type) diff --git a/src/map/bitmapline.cpp b/src/map/bitmapline.cpp index 49420510..4afb8360 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..4e95df64 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); From 6bb0c723611dc3277c261daaf874da389fc2005a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 15:53:19 +0200 Subject: [PATCH 10/35] Some more marine lines --- gpxsee.qrc | 1 + icons/map/marine/fishing-line.png | Bin 0 -> 336 bytes src/map/IMG/style.cpp | 4 +++- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 icons/map/marine/fishing-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 7ea07373..34783f32 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -312,6 +312,7 @@ 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 diff --git a/icons/map/marine/fishing-line.png b/icons/map/marine/fishing-line.png new file mode 100644 index 0000000000000000000000000000000000000000..39602831e24a53a06e1ac5d23c8ed32c9209fe39 GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0y~yV31*8U|{E9V_;yAmeD=Kz`(#*9OUlAc=M!AJp%&+ zOS+@4BLl<6e(pbstPBhc3dtTpz6=aiY77hwEes657#J8DUNA6}8Za=tN?>5Hn!&&z zUNC1@pbY~916z`}y9!vY3r?)vGa3=9mM1s;*b3=F*2L734=V|E1t1H*Dp7sn8d z^Gky^3LaMAskyl^cBxm$<;|VbJ{0I2RC^h$J@bJ0WVYuPb5G8EB5k2K@4xtxMVtqw zD%&Rt)F>2gx>dF3c;UXY+;y#8YNE1bS(@)xiUiKv`e@2^xdYq`qAtqrahsHxCN%Ny zwTQGd%3XA7pR&T^2hP_f`BkQ$uT=cNb9=|prHg`}HolYonK*Uo&Sejr)6*>e7&~v8 nI3vDFP`y9OrFU6}@^bUs{1Ww59+hSc3=9mOu6{1-oD!M Date: Sat, 10 May 2025 16:02:08 +0200 Subject: [PATCH 11/35] Traffic separation lines --- src/map/IMG/style.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 922342d9..2ceb29bf 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -506,6 +506,7 @@ void Style::defaultLineStyle(qreal ratio) _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[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2)); _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1.5, Qt::DashDotLine)); _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotLine)); _lines[0x10606] = Line(QImage(":/marine/anchor-line.png")); From f3b97cb71fd83ccf6feb1277f97b4daaaeb7484b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 20:09:56 +0200 Subject: [PATCH 12/35] Improved dumpgrounds rendering --- src/map/ENC/attributes.h | 1 + src/map/ENC/mapdata.cpp | 5 ++++- src/map/ENC/style.cpp | 27 +++++++++++++++++++++++++-- src/map/IMG/style.cpp | 11 +++++++---- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h index 7cef6a21..b4a38c58 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 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index fa0f9960..241d3173 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) @@ -477,6 +478,8 @@ 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; switch (type) { case DEPARE: diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 60e4d6e5..5cb0e6db 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -104,7 +104,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, @@ -244,7 +256,9 @@ void Style::polygonStyle() << 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) + << 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) @@ -542,6 +556,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/style.cpp b/src/map/IMG/style.cpp index 2ceb29bf..c14e4dff 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -351,7 +351,9 @@ 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), @@ -382,8 +384,8 @@ void Style::defaultPolygonStyle() << 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 << 0x10409 << 0x10503 - << 0x10105; + << 0x10613 /*raster*/ << 0x1060a << 0x10407 << 0x10408 << 0x10409 + << 0x10503 << 0x10105; } void Style::defaultLineStyle(qreal ratio) @@ -497,6 +499,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10406] = Line(QImage(":/marine/cable-area-line.png")); _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); + _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); @@ -505,7 +508,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10505] = Line(QImage(":/marine/noanchor-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[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); _lines[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2)); _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1.5, Qt::DashDotLine)); _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotLine)); From 7f591cb2c2b34ff3da371b12d3892b2a7fee2ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 May 2025 20:15:51 +0200 Subject: [PATCH 13/35] Refactoring --- src/map/IMG/rastertile.cpp | 2 +- src/map/bitmapline.cpp | 2 +- src/map/bitmapline.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 00f5882d..527cbfe2 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -208,7 +208,7 @@ void RasterTile::drawLines(QPainter *painter, if (!style.img().isNull()) { if (poly.flags & MapData::Poly::Invert) - BitmapLine::drawr(painter, poly.points, style.img()); + BitmapLine::drawR(painter, poly.points, style.img()); else BitmapLine::draw(painter, poly.points, style.img()); } else if (style.foreground() != Qt::NoPen) { diff --git a/src/map/bitmapline.cpp b/src/map/bitmapline.cpp index 4afb8360..118364db 100644 --- a/src/map/bitmapline.cpp +++ b/src/map/bitmapline.cpp @@ -53,7 +53,7 @@ void BitmapLine::draw(QPainter *painter, const QPolygonF &line, } } -void BitmapLine::drawr(QPainter *painter, const QPolygonF &line, +void BitmapLine::drawR(QPainter *painter, const QPolygonF &line, const QImage &img) { int offset = 0; diff --git a/src/map/bitmapline.h b/src/map/bitmapline.h index 4e95df64..520117a2 100644 --- a/src/map/bitmapline.h +++ b/src/map/bitmapline.h @@ -11,7 +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 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); From 408a671279aa992c6fa430b1f8d8e1ef5bcef95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 11 May 2025 09:07:46 +0200 Subject: [PATCH 14/35] Microoptimization --- src/map/IMG/mapdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/IMG/mapdata.h b/src/map/IMG/mapdata.h index 12c2c5e4..668b474f 100644 --- a/src/map/IMG/mapdata.h +++ b/src/map/IMG/mapdata.h @@ -41,10 +41,10 @@ public: 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; quint32 flags; bool operator<(const Poly &other) const From 3d4d0c71558f9c357fcaa740b9151fec7b672ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 13 May 2025 09:26:43 +0200 Subject: [PATCH 15/35] Improved shoreline constructions rendering --- src/map/ENC/attributes.h | 2 + src/map/ENC/mapdata.cpp | 4 ++ src/map/ENC/style.cpp | 141 +++++++++++++++++++++++++++++---------- src/map/IMG/style.cpp | 1 + 4 files changed, 114 insertions(+), 34 deletions(-) diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h index b4a38c58..153960b0 100644 --- a/src/map/ENC/attributes.h +++ b/src/map/ENC/attributes.h @@ -13,6 +13,7 @@ #define CATMOR 40 #define CATTRK 54 #define CATREA 56 +#define CATSLC 60 #define CATSIT 61 #define CATSIL 63 #define CATSCF 65 @@ -42,6 +43,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 241d3173..09ba558b 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -480,6 +480,10 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr, subtype = CATCOV; else if (type == DMPGRD) subtype = CATDPG; + else if (type == SLCONS) + subtype = CATSLC; + else if (type == I_SLCONS) + subtype = I_CATSLC; switch (type) { case DEPARE: diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 5cb0e6db..796ec6f7 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -128,10 +128,46 @@ 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(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 1)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 2)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), + 2, Qt::DashLine)); + _polygons[SUBTYPE(SLCONS, 3)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 4)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 5)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 6)] = Polygon(Qt::NoBrush, 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(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 9)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 10)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 11)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 12)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), + 2, Qt::DashLine)); + _polygons[SUBTYPE(SLCONS, 13)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), + 2, Qt::DashLine)); + _polygons[SUBTYPE(SLCONS, 14)] = Polygon(Qt::NoBrush, 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)), @@ -252,34 +288,45 @@ 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) << 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(SLCONS) << SUBTYPE(SLCONS, 1) << SUBTYPE(SLCONS, 2) + << SUBTYPE(SLCONS, 3) << SUBTYPE(SLCONS, 4) << SUBTYPE(SLCONS, 5) + << SUBTYPE(SLCONS, 6) << SUBTYPE(SLCONS, 7) << SUBTYPE(SLCONS, 8) + << SUBTYPE(SLCONS, 9) << 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); } void Style::lineStyle(qreal ratio) @@ -298,8 +345,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)); @@ -474,6 +546,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")); diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index c14e4dff..310d33df 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -501,6 +501,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); + _lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2)); _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png")); From 2bde41f09e7aa89d78da01a5fa3b0ab31439f247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 14 May 2025 00:01:45 +0200 Subject: [PATCH 16/35] Only use the image-lines when there is direction info present for the lines --- gpxsee.qrc | 1 + icons/map/marine/anchor-line.png | Bin 170 -> 295 bytes icons/map/marine/cable-area-line.png | Bin 130 -> 225 bytes icons/map/marine/fishing-line.png | Bin 336 -> 348 bytes icons/map/marine/minefield-line.png | Bin 0 -> 200 bytes icons/map/marine/pipeline-area-line.png | Bin 137 -> 235 bytes src/map/IMG/mapdata.h | 3 +- src/map/IMG/rastertile.cpp | 4 ++- src/map/IMG/rgnfile.cpp | 4 ++- src/map/IMG/style.cpp | 35 +++++++++++++++++------- 10 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 icons/map/marine/minefield-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 34783f32..4848fef1 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -313,6 +313,7 @@ icons/map/marine/degaussing-line.png icons/map/marine/nofishing-line.png icons/map/marine/fishing-line.png + icons/map/marine/minefield-line.png diff --git a/icons/map/marine/anchor-line.png b/icons/map/marine/anchor-line.png index 43067ec8acd661f56b4d47362759db9e257a11e8..27dfaabb7cc8337f04893bc9bdc0c51521d963b1 100644 GIT binary patch delta 263 zcmZ3*xST1gGr-TCmrII^fq{Y7)59f*fq_AWfq{XYgN=cKL0U%l3eMqZFeoH@1o<*BRH-pAG_)`<{9<5WXn4WEP-?)y@G60U z!Djsurym&YEOf@h~@1NAM?0R R%nS?+44$rjF6*2UngA;ASIhta delta 137 zcmZ3^w2D!&Gr-TCmrII^fq{Y7)59f*fq_AUfq{XYgN=cKf#YDz`(%Z>FVdQ&MBb@0GEm|5dZ)H diff --git a/icons/map/marine/cable-area-line.png b/icons/map/marine/cable-area-line.png index f8ed6111072ce346e4f4b12af2ab75f3c901fee0..775eed1f13c3ea91398d3ca064b573b22ec18d68 100644 GIT binary patch delta 192 zcmZo-e8`y98Q|y6%O%Cdz`(%k>ERN@z`!8Jz`(%H!N$PAz+<2&uZ5?JV~EE2l!?X)Wf$Ck@6yjiazz#bIh!@$76;OXk;vd$@?2>_i)H=h6i delta 97 zcmaFJ*u<#V8Q|y6%O%Cdz`(%k>ERN@z`(%Iz`(%H!N$PAaJ^MrePWiDxss=gV~E7% zbce~VGr-TCmrII^fq{Y7)59f*fq_AVfq{XYgN=cKA;IE30|NsCOS+@4BLl<6 ze(pbstPBhcjKx9jPK-BC>eNrPGvx%SVEF00yMAJgMEzz@7sn8d^IL-r`3@QI>|tRF zHa99i@BgRM?%ezr{y&a%a&|Uy9h$U2!z-{m$~#cychdZKGR}!C1s@mhU&zJ#YRUBU zx!)I?-!Rtb5!vOYmlfc>P}8Gq=Qj4~$-DR&;uw4kUp#TQXKZk?W+-Qv5GNP8u;uTg zZ5?+kv_H(-?A+|R>!Fp8Zs}|D>?^ak+MAy&3#iDOuu0_B)@DtU)jD~N-Lgf|Z!RSL m(N9nke!bZ7uDyIZ=R0QR-R+GBdsTEnKJj$*b6Mw<&;$U+BWgha delta 260 zcmcb^bb(2)Gr-TCmrII^fq{Y7)59f*fq_AWfq{XYgN=cKL0U%l3lE;Uiv zvMkN_D@6k5ZGAN5y4(S722mGf_qa{UOcR>;_gX|+8s#oJwNF{$@dM{;ll&^v&sQpb zu;sbEKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8koRERN@z`!8Qz`(%H!N$PA@biG#Rt5$JmUKs7M+SzC z{oH>NSs54@7>k44ofvPP)Tw7+U{FZ*2=ZlMs8VBKXlP+z_{G4$(C~tRq11qZ;Z*_y zgVhWM2JwP9y8>+{Dr$v0dAc};Xq-<@kl6NM>+{$D*W1SbU)~NxZ~rs)mnU6eWKf?g#W7R2uZV$xfx*+&&t;uc GLK6VvRY2AN delta 104 zcmaFO*vY8a8Q|y6%O%Cdz`(%k>ERN@z`!8Hz`(%5!N$PA(CnChablL1ou;RYV~E7% z}kU14(HbOr_n22WQ% Jmvv4FO#m_UBH#c3 diff --git a/src/map/IMG/mapdata.h b/src/map/IMG/mapdata.h index 668b474f..1ad4443b 100644 --- a/src/map/IMG/mapdata.h +++ b/src/map/IMG/mapdata.h @@ -33,7 +33,8 @@ public: enum Flags { OneWay = 1, - Invert = 2 + Invert = 2, + Direction = 4 }; /* QPointF insted of Coordinates for performance reasons (no need to diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 527cbfe2..d4f616be 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -204,7 +204,9 @@ 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( + (poly.flags & MapData::Poly::Direction) + ? poly.type | 1<<20 : poly.type); if (!style.img().isNull()) { if (poly.flags & MapData::Poly::Invert) diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 399d1db8..4b3cfd41 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -252,7 +252,9 @@ bool RGNFile::readLineInfo(Handle &hdl, quint32 size, MapData::Poly *line) const if (!readUInt8(hdl, val)) return false; - if (((val >> 3) & 3) & 2) + if ((val >> 3) & 3) + line->flags |= MapData::Poly::Direction; + if ((val >> 3) & 2) line->flags |= MapData::Poly::Invert; return true; diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 310d33df..b3ba0c46 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -495,26 +495,41 @@ void Style::defaultLineStyle(qreal ratio) _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[0x10403] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DotLine)); _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[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110405] = Line(QImage(":/marine/pipeline-area-line.png")); + _lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110406] = Line(QImage(":/marine/cable-area-line.png")); _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); + _lines[0x1040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine)); _lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2)); - _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); - _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); - _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png")); + _lines[0x10501] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110501] = Line(QImage(":/marine/noanchor-line.png")); + _lines[0x10502] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110502] = Line(QImage(":/marine/nofishing-line.png")); + _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110503] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x10505] = Line(QImage(":/marine/noanchor-line.png")); - _lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png")); - _lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png")); + _lines[0x10505] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110505] = Line(QImage(":/marine/noanchor-line.png")); + _lines[0x10506] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine)); + _lines[0x110506] = Line(QImage(":/marine/nature-reserve-line.png")); + _lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110507] = Line(QImage(":/marine/safety-zone-line.png")); + _lines[0x10508] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); + _lines[0x110508] = Line(QImage(":/marine/minefield-line.png")); _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); _lines[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2)); _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1.5, Qt::DashDotLine)); _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotLine)); - _lines[0x10606] = Line(QImage(":/marine/anchor-line.png")); - _lines[0x10608] = Line(QImage(":/marine/fishing-line.png")); + _lines[0x10606] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110606] = Line(QImage(":/marine/anchor-line.png")); + _lines[0x10608] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110608] = Line(QImage(":/marine/fishing-line.png")); + _lines[0x1060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine)); _lines[0x1060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine)); _lines[0x1060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); _lines[0x10611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); From 46375cdee237e9eef9eb7c29f850bf8b31a1f75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 14 May 2025 07:45:42 +0200 Subject: [PATCH 17/35] Unify all marine area lines --- icons/map/marine/dw-route-line.png | Bin 189 -> 271 bytes icons/map/marine/fishing-farm-line.png | Bin 269 -> 353 bytes icons/map/marine/shellfish-farm-line.png | Bin 335 -> 334 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/map/marine/dw-route-line.png b/icons/map/marine/dw-route-line.png index ba5fed55f5677190b192f1cdab601211e6d308f3..3f707b0876c201ce768ee373238449a00b3c7d66 100644 GIT binary patch delta 238 zcmdnX*w2*J8Q|y6%O%Cdz`(%k>ERN@z`&ryz`(%H!N$PAkgGP|oq>UYu{g-xiSg!1 zoq7fa29|V3Uq=Rpjs4tz5?L7-7!;B{f_xbms?-=58d?|_elajGG`wJ7C^cYUc$L7w zU^Rn*LA+qju0WfKidxlao-U3d8t0P}5)u+B-v0b$ZW`&OTUfq}u()z4*}Q$iB}$7oMd delta 156 zcmeBY+RLce8Q|y6%O%Cdz`(%k>ERN@z`&rvz`(%H!N$PAP{qREH!(}ADAv=(F~s6@ zaza8vLdDykzwC|D9GG6zI6b<;reo0dqAbuY<@Cg#%$zeeaCYU1rydb=`od+pM$v;) z;o8Fu5sI$1p)wv>MGBTb1x`sA*jf2r*KpfBMRc}$!BXESCWfR9PDyL$pFYdLz`)?? L>gTe~DWM4fdI~f^ diff --git a/icons/map/marine/fishing-farm-line.png b/icons/map/marine/fishing-farm-line.png index c2282df113dfa95c10d8557db8612d1227a94863..b066da1cf400fcf8d1202b136f24fbc4a9d7ff66 100644 GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0y~yU{GRUU|{E9V_;y&Rh#e5z`(#*9OUlAc=M!AJp%&+ zOS+@4BLl<6e(pbstPBhc3dtTpz6=aiY77hwEes657#J8DUNA6}8Za=tN?>5Hn!&&z zUNC1@pbY~916z`}y9!vY3r?)vGa3=9mM1s;*b3=F*2L734=V|E1t1H%qa7sn8d z^J^y=@-;aKxXNcVu}`=peMV75?AYWAb!&geH3r+Z{TDmp$DLG?t8lPXb-|yk@<}&q zKR)%Ves{xwde6;D;+$l z*Q=hroL*bQ!?$|L+h`^6qn<%e=0sQ4M!r3gQN`Hf=5{aLGp~t(fq}u()z4*}Q$iB} DGZA)m delta 255 zcmaFJ)XQYt8Q|y6%O%Cdz`(%k>ERN@z`&r$z`(%H!N$PA&?czj!oa}5mgMaYq8S(% zemd{2pI9SNzt+>mF+}71+DW^44;e_boEHmHD>%t!&LYT~BviI2xvS$;$Fy(TJh)w3 z4rIz`N~p7(2(3Huz20iRqsU2xlM2d{v>Eo5hj{H`*pbL~Gv$V&te=qz1H%K)IK#<4 z_M8kF0Xb48$5*mBzx>PkvD<2bV!!`)%MK&q{}K(XAJXFTowKF?u3den_Du4`H{U1u z$;K?3FnRx>(07v4``34AW`4i4Z>hbvkzz~fr*%D?XBLTh#5yO=63>oiU|?YIboFyt I=akR{01%a2LjV8( diff --git a/icons/map/marine/shellfish-farm-line.png b/icons/map/marine/shellfish-farm-line.png index 7236ec5154e466705a6b16d5eb4ee52238464cfe..dda159c1b950158ec4d6515677aa0d43280a0a6a 100644 GIT binary patch delta 229 zcmX@lbdE`}Gr-TCmrII^fq{Y7)59f*fq_AWfq{XYgN=cKL0U%l%tXcF`lX&Ojv*T7 z*G_WeI^@9PTJI#dRl9ZP(fu9j?_7(z-`&xeR(3~4fX#d1*Y!q?o^f?b1ryf@&Yqd` z^t;#X?K3$&RV)2{^L|V|vfP6CN5wk!4?US4*F;v&)NPk~rlfLIan;PLDXX{by!K9) zwdA@0cZ1{s&I37EGr-TCmrII^fq{Y7)59f*fq_Aqfq{XYgN=cK;pYLftrHcC>z8@DIEHAP zUmN7e#bn4c=bG!3c_P2Me|G49Q~un&w^AVRR+XpX6xXE|%S{w#o?ODnHfingNr$%o z;d%69nuv$nq;&U!L-GPXe;E&4F5*0}Hs5j6P7AM9ms9E(P9`wTTJmg7kKOaNUq3Ky ze|36+34;d1H-@-tQy6TvwJ{y2id_8F=IEL~AGe+UAlP@$NH{p>@vYqNC$8T)I&FU5 owvE61f=r$4RXlf{zxRfBZ%L?=YTbi73=9kmp00i_>zopr0N^@h0ssI2 From 53ace440c58c68cef2e30c0a34b3b2409d135667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 14 May 2025 08:28:06 +0200 Subject: [PATCH 18/35] Fishing stakes non-directional line --- src/map/IMG/style.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index b3ba0c46..27b50572 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -496,7 +496,8 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10401] = Line(QImage(":/marine/cable.png")); _lines[0x10402] = Line(QImage(":/marine/pipeline.png")); _lines[0x10403] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DotLine)); - _lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png")); + _lines[0x10404] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); + _lines[0x110404] = Line(QImage(":/marine/fishing-farm-line.png")); _lines[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); From 4f25835281871ddea2eae7650d4c52f696a46497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 14 May 2025 20:05:49 +0200 Subject: [PATCH 19/35] Properly fill the SLCONS areas --- src/map/ENC/style.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 796ec6f7..011f8ad7 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -128,17 +128,24 @@ 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(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 1)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 2)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), - 2, Qt::DashLine)); - _polygons[SUBTYPE(SLCONS, 3)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 4)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 5)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 6)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _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(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); + _polygons[SUBTYPE(SLCONS, 8)] = Polygon(QBrush(QColor(0xe8, 0xe0, 0x64), + Qt::Dense4Pattern), QPen(QColor(0, 0, 0), 2)); _polygons[SUBTYPE(SLCONS, 9)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); _polygons[SUBTYPE(SLCONS, 10)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); _polygons[SUBTYPE(SLCONS, 11)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); From cebe4cde692f11b734904d759394f0f7b4ea1fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 14 May 2025 20:59:59 +0200 Subject: [PATCH 20/35] Some more SLCONS style tweaking --- src/map/ENC/style.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 011f8ad7..aeef711a 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -146,14 +146,18 @@ void Style::polygonStyle() 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(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 10)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 11)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 2)); - _polygons[SUBTYPE(SLCONS, 12)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), - 2, Qt::DashLine)); - _polygons[SUBTYPE(SLCONS, 13)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), - 2, Qt::DashLine)); - _polygons[SUBTYPE(SLCONS, 14)] = Polygon(Qt::NoBrush, 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)); @@ -296,9 +300,9 @@ void Style::polygonStyle() << TYPE(BUAARE) << TYPE(BUISGL) << TYPE(SILTNK) << TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(TUNNEL) << TYPE(I_TERMNL) << TYPE(SLCONS) << SUBTYPE(SLCONS, 1) << SUBTYPE(SLCONS, 2) - << SUBTYPE(SLCONS, 3) << SUBTYPE(SLCONS, 4) << SUBTYPE(SLCONS, 5) - << SUBTYPE(SLCONS, 6) << SUBTYPE(SLCONS, 7) << SUBTYPE(SLCONS, 8) - << SUBTYPE(SLCONS, 9) << SUBTYPE(SLCONS, 10) << SUBTYPE(SLCONS, 11) + << 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) From 018ec283395be34a66e8d1a9b1ec56d857667701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 15 May 2025 09:05:35 +0200 Subject: [PATCH 21/35] Merge consecutive same colors --- src/map/ENC/mapdata.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 09ba558b..98ce2b1e 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -339,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; } From 10555723cd5b0f87f7e279a5c053ee2199714984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 15 May 2025 18:59:49 +0200 Subject: [PATCH 22/35] Orange and grey buoys --- gpxsee.qrc | 14 ++++++++ icons/map/marine/beacon-black-orange.png | Bin 0 -> 283 bytes icons/map/marine/beacon-grey.png | Bin 0 -> 283 bytes icons/map/marine/beacon-orange-black.png | Bin 0 -> 284 bytes icons/map/marine/beacon-orange-white.png | Bin 0 -> 286 bytes icons/map/marine/beacon-orange.png | Bin 0 -> 281 bytes .../map/marine/beacon-white-orange-white.png | Bin 0 -> 290 bytes icons/map/marine/beacon-white-orange.png | Bin 0 -> 285 bytes icons/map/marine/buoy-black-orange.png | Bin 0 -> 330 bytes icons/map/marine/buoy-grey.png | Bin 0 -> 339 bytes icons/map/marine/buoy-orange-black.png | Bin 0 -> 334 bytes icons/map/marine/buoy-orange-white.png | Bin 0 -> 348 bytes icons/map/marine/buoy-orange.png | Bin 0 -> 336 bytes icons/map/marine/buoy-white-orange-white.png | Bin 0 -> 341 bytes icons/map/marine/buoy-white-orange.png | Bin 0 -> 340 bytes src/map/ENC/style.cpp | 30 ++++++++++-------- 16 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 icons/map/marine/beacon-black-orange.png create mode 100644 icons/map/marine/beacon-grey.png create mode 100644 icons/map/marine/beacon-orange-black.png create mode 100644 icons/map/marine/beacon-orange-white.png create mode 100644 icons/map/marine/beacon-orange.png create mode 100644 icons/map/marine/beacon-white-orange-white.png create mode 100644 icons/map/marine/beacon-white-orange.png create mode 100644 icons/map/marine/buoy-black-orange.png create mode 100644 icons/map/marine/buoy-grey.png create mode 100644 icons/map/marine/buoy-orange-black.png create mode 100644 icons/map/marine/buoy-orange-white.png create mode 100644 icons/map/marine/buoy-orange.png create mode 100644 icons/map/marine/buoy-white-orange-white.png create mode 100644 icons/map/marine/buoy-white-orange.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 4848fef1..c385c813 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 diff --git a/icons/map/marine/beacon-black-orange.png b/icons/map/marine/beacon-black-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..214f8cb2e4e541b5648af3088f0b83c3caf03b72 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp@3=9n79Bd2>3>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=J{m#6dIOo>nFTe8E^r&uoV!C+ahM5Vk bT^I_ORcE^h*4YN?f!yZl>gTe~DWM4f;oo5G literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-grey.png b/icons/map/marine/beacon-grey.png new file mode 100644 index 0000000000000000000000000000000000000000..28439314ed8963d6d3d89d6f0817565fdb5feec2 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp@3=9n79Bd2>3>TIiZDe3zU@Q)DcVfJGQm3AQfq^C6 z(btiIVPik{pF~y$1_p&>k04(LhAK4%hK3dfhF=T}3=JRD=%g{bf`Ngd$kW9!#NzbZ zkkecT6nMPbrE8;`z&BPUMCN&+f}? h+}-jzlQ|gjT&r9KW44MfVPIfj@O1TaS?83{1OReGTA=^{ literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-orange-black.png b/icons/map/marine/beacon-orange-black.png new file mode 100644 index 0000000000000000000000000000000000000000..63791879455a414116344ca1c4d73620bab5ddfa GIT binary patch literal 284 zcmeAS@N?(olHy`uVBq!ia0vp@3=9n79Bd2>3>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=JnriFwkTa_vbg6^bH{t~xz&j%9rU`X-6=KCfJLXOfLurOIR*PxgTe~DWM4f{ybhw literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-orange-white.png b/icons/map/marine/beacon-orange-white.png new file mode 100644 index 0000000000000000000000000000000000000000..fcfd16d7d463278914096a458f794487ca76ff21 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp@3=9n79Bd2>3>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=Jvb2CBC^K|udS?83{1OOOYUqS!? literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-orange.png b/icons/map/marine/beacon-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..7511fe60e9585d24e1d82d8e9d8b83bd0940a5fd GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp@3=9n79Bd2>3>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=J5f0l&u!U zDv8v3X@5J@^{DrKOM2ViY~BYKdgmwgxEmdv{3Y9B^}$EVzW(+RH~u78cQQO+ XD5!H@3gj|RS3j3^P63>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=Jnt_9e+}O^$zl^4lW6jW!7y=gVexNqeuF ivv!Bd?}M9tRXoi3>TIiZDe3zU`coMb!1@J*w6hZk(Ggg zfw4Hq-HGw$Nu7EI1_p&>k04(LhAK4%hK3dfhF=T}3=JKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8Sm^2E7-DgH>10c> z!v-8K=@qMrT<4z;FY(s;)S)7FyCmvawu6HWM`-B&XUU40za`3#sLe^NSs54@6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYc&h6N1L-1XB-85kHi3p^r=85p>QL70(Y)*J~228LChE{-7< zrSTWJgZsz!JDVIr zqh?Ne^Gq;$XSfV!+UE|IDYq@Sr%BDc$@)N;lTG;V%(OP`j}sznU%XS;DVm=gFUWuU s;^wKmylPh67W0E%Y?`pK;|uGfBPsWLgKoMqFfcH9y85}Sb4q9e013HytN;K2 literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-orange-black.png b/icons/map/marine/buoy-orange-black.png new file mode 100644 index 0000000000000000000000000000000000000000..578e92a87f62a5bfa3b7af33ff7055c160d98b53 GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0y~yU=UKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8SnBEG7-DgHZjdA2 zVFjMeg8T3M{_$wtyHp=BUd3D$m8ityem;9NJU`{{W1IBZ{+I9vmUUO>H<|jJRaczJ zV!c6liPyh*?pdM?7mTDO8%>i>hwOMVcWS^%&J9tT6PI)?n)^DO;n3p5^8N!}o47+# zQng+NF7Xyy8~r&UH>4)k@k)Q*!IV66LEg>o{Hl#l1Z#R~S!+&r?q8ep!tK%Ki08q# eLbfG|sm6X>Q=AobYWq)+cRXGFT-G@yGywomS8@>m literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-orange-white.png b/icons/map/marine/buoy-orange-white.png new file mode 100644 index 0000000000000000000000000000000000000000..5de1acb275e99add1f041897c8fc23d0448b4f0c GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0y~yU=UKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8*zD=z7-DgHZiuJQ zVFMl~sr{QO&R!5XXYtzxW{a@fte-_p-5rHk zj5i2P@zOh=o+--kU}|rdgPigDkOzllD!x?5d(IVndE{@PM_SjWnV;h~y?M>T81p?d z$unrO#q01pt&^s?S}99RT`hV&;pk4LGjCSEy2Nh8{dhIknOQeC@q3otTRu7B=s(UM t(umL=jrO_vd$@?2>@Gvcf9}r literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-orange.png b/icons/map/marine/buoy-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..07ddb01ffd8a23d7d25efe34c8e3cde55738f7cb GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0y~yU=UKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8SnlcK7-DgH?qo-y zRs|ks;bT+7pVY)$%>DoD@e!t_w`BP^*XOF(O_@1!-p@#nZ|^Pcb?m-y{bN{;Z$?(a zCEl#{DEc4bqnrkQX3yJ6;w4Hbg5sq@}ZNBN|^pENsqjvw{N5$Ib8N7FU`5R^W35H g>Y}?eQhb#DGHfx8yS#3;ZUM+cp00i_>zopr07U?H-~a#s literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..858f8a2c5f1726a4133bd57beaa9800da658d597 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0y~yU=UKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8SmWv97-DgHZiu50 zvm%GLMEuU*`@VJVz0_T%!St#q+Q85u=8@xyRk!l(*d{6WmodpX$iEfIVePG1&0(}* z{Zg+w+x@4)7#V`LesuqkRwlVL$k0{&Q)#5<*^ZppQ-9;4rrlKaOkL5@@!dx)`g4KH zzopr05LRoivR!s literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-white-orange.png b/icons/map/marine/buoy-white-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..7f7e2ffbbca5f78eb7ff228244236e62fc1275c6 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0y~yU=UKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*fm;}a85w5Hkzin8SncWJ7-DgH?qqMF z!wNjks{E^C44-HB-&nhwQ&zmb;883`)d@ENey`B0b)Pp*nDbhq{7CSQYdf^JwLSZ_ zf?;OG-|1ExZN>8#8G^P3GM-7Ca*FkyPVBi!S6*?ep4c@d%%jM?L||=OLF1w|C)VBP z*fP&liG6=%#1F~sObk6usg5=u84Fl4|F*9=SaiVUjZn7vDlLz^qqlFAA9+{y=3d)5 l=Qlc5{O5PBbvm|ess5thX=1DY+UbHk<>~6@vd$@?2>`v}cbxzL literal 0 HcmV?d00001 diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index aeef711a..e4939ef5 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); \ From 7e1d0dfb22d0fc9f78b4e13f460768e5020e808a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 16 May 2025 22:35:55 +0200 Subject: [PATCH 23/35] IMG marine style enhancements --- gpxsee.qrc | 3 + .../international-maritime-boundary.png | Bin 0 -> 246 bytes .../seaward-limit-of-territorial-sea.png | Bin 0 -> 265 bytes .../straight-territorial-sea-baseline.png | Bin 0 -> 259 bytes src/map/IMG/rastertile.cpp | 16 +++++- src/map/IMG/rgnfile.cpp | 9 ++- src/map/IMG/rgnfile.h | 3 +- src/map/IMG/style.cpp | 52 ++++++++++++++++-- src/map/IMG/style.h | 5 ++ 9 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 icons/map/marine/international-maritime-boundary.png create mode 100644 icons/map/marine/seaward-limit-of-territorial-sea.png create mode 100644 icons/map/marine/straight-territorial-sea-baseline.png diff --git a/gpxsee.qrc b/gpxsee.qrc index c385c813..8a1a9b40 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -328,6 +328,9 @@ 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 diff --git a/icons/map/marine/international-maritime-boundary.png b/icons/map/marine/international-maritime-boundary.png new file mode 100644 index 0000000000000000000000000000000000000000..86a5c02e49cfa9c8a306495a66002b612f70485b GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0y~yU=U+qU|{E9V_;z5vD?eaz`($g?&#~tz_78O`%fZ> z&sZGf?!LqiJ#!!HH~hK3gm45bDP46hOx7_4S6Fo+k- z*%fHRz`($kS)vwdY&S-}yp+eJprV7hXy1IkGFLWVgo6tiYH*w?2RUe|_HinVvj$YBiI3p0s?- nK7ZY(g4ZqRgpXUxVO}X2K{z`($g?&#~tz_78O`%fY( z0|NtNage(c5Hn!&&z zUNC1@pbY~916z`}y9)yt{B+(8(#=`m5n0T@zRzBzU?whFF|VPHVA?{l4?RcP*1RYSoV8*po5OZ~Rkyh6egFR7`fO^f z>G^u=^Xz4gleffG?@JT8tM`lj)#d#vPlT5poON^N$qU8_^B5WU7w8u*f4QXqKPaq6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYdQ`02bGq?@zABeIx*f%iHHGdgL^u3%tbi1KuC4AD4$cH%)n z21O2L=37jzfg4?yvVHy6S7cP&|JZ+$Z_Bw(dzrbL+ALca2OA$s6bP0l+XkK DW~WdQ literal 0 HcmV?d00001 diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index d4f616be..cd840aa6 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -186,6 +186,16 @@ void RasterTile::drawPolygons(QPainter *painter, } } +static quint32 lineType(quint32 type, quint32 flags) +{ + if (Style::isMiscLine(type)) + return type | (flags & 0xFF000000); + else if (flags & MapData::Poly::Direction) + return type | 1<<20; + else + return type; +} + void RasterTile::drawLines(QPainter *painter, const QList &lines) const { @@ -205,8 +215,7 @@ 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.flags & MapData::Poly::Direction) - ? poly.type | 1<<20 : poly.type); + lineType(poly.type, poly.flags)); if (!style.img().isNull()) { if (poly.flags & MapData::Poly::Invert) @@ -528,7 +537,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); diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 4b3cfd41..ab7599d2 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -244,8 +244,11 @@ bool RGNFile::readLabel(Handle &hdl, LBLFile *lbl, Handle &lblHdl, return true; } -bool RGNFile::readLineInfo(Handle &hdl, quint32 size, MapData::Poly *line) const +bool RGNFile::readLineInfo(Handle &hdl, quint8 flags, quint32 size, + MapData::Poly *line) const { + line->flags |= (flags & 0xf)<<24; + if (size == 1) { quint32 val; @@ -308,9 +311,11 @@ 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::isMarineLine(line->type)) - readLineInfo(hdl, rs, line); + readLineInfo(hdl, flags, rs, line); return seek(hdl, off + rs); } diff --git a/src/map/IMG/rgnfile.h b/src/map/IMG/rgnfile.h index 76ed48cb..b6b6b576 100644 --- a/src/map/IMG/rgnfile.h +++ b/src/map/IMG/rgnfile.h @@ -69,7 +69,8 @@ private: MapData::Point *point) const; bool readLightInfo(Handle &hdl, quint8 flags, quint32 size, MapData::Point *point) const; - bool readLineInfo(Handle &hdl, quint32 size, MapData::Poly *line) const; + bool readLineInfo(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 27b50572..98e8dd32 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); \ @@ -490,9 +490,11 @@ 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[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[0x10403] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DotLine)); @@ -507,6 +509,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x1040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine)); _lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2)); + _lines[0x10501] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10502] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); @@ -514,6 +517,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110503] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x110504] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10505] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110505] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10506] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine)); @@ -522,15 +526,36 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x110507] = Line(QImage(":/marine/safety-zone-line.png")); _lines[0x10508] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); _lines[0x110508] = Line(QImage(":/marine/minefield-line.png")); - _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); + + _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1)); + _lines[0x10601 | 1<<24] = Line(QPen(QColor(0, 0x90, 0xfc), 1)); + _lines[0x10601 | 2<<24] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1)); + _lines[0x10601 | 3<<24] = Line(QPen(QColor(0xa7, 0xf1, 0xfc), 1)); + _lines[0x10601 | 4<<24] = Line(QPen(QColor(0xff, 0x40, 0x40), 1)); + _lines[0x10601 | 5<<24] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1)); + _lines[0x10601 | 6<<24] = Line(QPen(QColor(0xfc, 0xe0, 0x1f), 1)); + _lines[0x10601 | 7<<24] = Line(QPen(QColor(0xfc, 0x79, 0x1e), 1)); + _lines[0x10601 | 8<<24] = Line(QPen(QColor(0x40, 0x40, 0x40), 1)); + _lines[0x10601 | 9<<24] = Line(QPen(QColor(0x84, 0xe6, 0xfc), 1)); + _lines[0x10601 | 10<<24] = Line(QPen(QColor(0x83, 0x53, 0x15), 1)); + _lines[0x10601 | 11<<24] = Line(QPen(QColor(0xd2, 0xfc, 0xfc), 1)); + _lines[0x10601 | 12<<24] = Line(QPen(QColor(0xc5, 0xf1, 0xc2), 1)); + _lines[0x10601 | 13<<24] = Line(QPen(QColor(0xfc, 0xc6, 0xfc), 1)); + _lines[0x10601 | 14<<24] = Line(QPen(QColor(0xe2, 0xdc, 0xa9), 1)); + _lines[0x10601 | 15<<24] = Line(QPen(QColor(0xcd, 0xcd, 0xcd), 1)); _lines[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2)); - _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1.5, Qt::DashDotLine)); - _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotLine)); + _lines[0x10603] = Line(QImage(":/marine/international-maritime-boundary.png")); + _lines[0x110603] = Line(QImage(":/marine/international-maritime-boundary.png")); + _lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1)); + _lines[0x110604] = Line(QImage(":/marine/straight-territorial-sea-baseline.png")); + _lines[0x10605] = Line(QImage(":/marine/seaward-limit-of-territorial-sea.png")); + _lines[0x110605] = Line(QImage(":/marine/seaward-limit-of-territorial-sea.png")); _lines[0x10606] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110606] = Line(QImage(":/marine/anchor-line.png")); _lines[0x10608] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110608] = Line(QImage(":/marine/fishing-line.png")); _lines[0x1060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine)); + _lines[0x11060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine)); _lines[0x1060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine)); _lines[0x1060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); _lines[0x10611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); @@ -833,6 +858,23 @@ void Style::defaultPointStyle(qreal ratio) _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")); diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 57f8a18b..755133c3 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -152,12 +152,17 @@ 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 isMarineLine(quint32 type) {return type >= 0x10400 && type < 0x10700;} + static bool isMiscLine(quint32 type) + {return type == 0x10601;} static bool isMarina(quint32 type) {return type == 0x10703;} + static bool hasColorset(quint32 type) {return (isBuoy(type) && !(type == 0x1020d || type >= 0x10216));} From 7c3a7c197389d1dfdd00a2f006468629763c8c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 17 May 2025 00:21:26 +0200 Subject: [PATCH 24/35] Boundary limits style enhancements --- gpxsee.qrc | 1 + .../marine/seaward-limit-of-contiguous-zone.png | Bin 0 -> 225 bytes src/map/ENC/attributes.h | 1 + src/map/ENC/mapdata.cpp | 2 ++ src/map/ENC/objects.h | 3 +++ src/map/ENC/style.cpp | 13 ++++++++++--- 6 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 icons/map/marine/seaward-limit-of-contiguous-zone.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 8a1a9b40..c40bd291 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -331,6 +331,7 @@ 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 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 0000000000000000000000000000000000000000..b9c41e0ead9e304d39e321dcb343091667aac8ca GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0y~yU@&4}U|{E9V_;zL>X2K{z`($g?&#~tz_78O`%fY( z0|NtNage(c5Hn!&&z zUNC1@pbY~916z`}y9)yt{B+(8(#=`m5n0T@zRzSa`ZPhFF|VPLO!_ zVC(bO|D8|n^*OBiK(e!!_2Sz_J Date: Sat, 17 May 2025 00:22:40 +0200 Subject: [PATCH 25/35] Extend the maximal point text box width --- src/map/textpointitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 2fec4dafdaa7fbe18e97b9a49474c202631e3d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 17 May 2025 06:53:16 +0200 Subject: [PATCH 26/35] Show recommended tracks orientation --- src/map/ENC/mapdata.cpp | 2 ++ src/map/ENC/style.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 924bb393..2f62a8e0 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -525,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/style.cpp b/src/map/ENC/style.cpp index 9dd5a6ac..b6f60647 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -411,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)); From fc96d4e88c564c35a1e49400ea780581a0709b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 17 May 2025 23:21:47 +0200 Subject: [PATCH 27/35] Redesigned the straight territorial sea baseline --- .../straight-territorial-sea-baseline.png | Bin 259 -> 270 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/map/marine/straight-territorial-sea-baseline.png b/icons/map/marine/straight-territorial-sea-baseline.png index e03a2f2e57117053f92bc9748ad2c3c19bf7702a..09fd37816c9c2fe30db454f4d0ab85cc917e6df1 100644 GIT binary patch delta 159 zcmZo>>SLOq!o^q|mdKI;Vst0PjyezW@LL delta 161 zcmeBUYG#_CBE^#K=G(&67Iy6YWen89?Bt^X~eIH4^zz zo-U3d8t2bWJSfPZ$id8fi^(-`qw7+(umAdrjEego`%m(1IoD|~Gj~&)W$WT#<3p*U zOE|7sVN$E_>w3)!7oVc4X1YL_<1 NI!{+Wmvv4FO#l$eK0W{d From a19188f58c3be002664588c7f0cacc3aa94dcacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 18 May 2025 00:32:21 +0200 Subject: [PATCH 28/35] Fouls --- gpxsee.qrc | 1 + icons/map/marine/foul.png | Bin 0 -> 342 bytes src/map/IMG/style.cpp | 1 + 3 files changed, 2 insertions(+) create mode 100644 icons/map/marine/foul.png diff --git a/gpxsee.qrc b/gpxsee.qrc index c40bd291..9d4af40f 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -332,6 +332,7 @@ 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 diff --git a/icons/map/marine/foul.png b/icons/map/marine/foul.png new file mode 100644 index 0000000000000000000000000000000000000000..da2b4aa8e0cfc377aea73d10e9837c9efcec3700 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0y~yU=U|uU=ZS9V_;y|@Z43Hfq{XsILO_J@#aaLdIkmt zmUKs7M+SzC{oH>NSs54@6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYc&h6N1L-1XB-85kHi3p^r=85nr4gD|6$#_S3P28OksE{-7< zr`Lv@<~wY_aajBBfB!Q6K($G&)2;ke7u|?p^AJ+WEM}OHl(979+hz;VfZD?!SY8=@ z?@~S%SYx&6Or}mJhqpD4?KR;q?zc{;iY8BpnRR=m$?w8b37&6%zThk~+3)(qOQs~5 zMR%dT=J}>?w#n~qhWU%B?A(#`e_h3$y8#J2Ay;j3>a Date: Sun, 18 May 2025 13:27:19 +0200 Subject: [PATCH 29/35] Some more GARMIN marine lines fixes/improvements --- gpxsee.qrc | 1 + icons/map/marine/dumping-ground-line.png | Bin 0 -> 200 bytes src/map/IMG/style.cpp | 6 +++++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 icons/map/marine/dumping-ground-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 9d4af40f..17df2d13 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -333,6 +333,7 @@ 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 diff --git a/icons/map/marine/dumping-ground-line.png b/icons/map/marine/dumping-ground-line.png new file mode 100644 index 0000000000000000000000000000000000000000..2965627885c7ac7c0d08d5408d7089e953150208 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0y~yVBlw9U|{87V_;yI<-1LXfq{XsILO_J@#aaLdIkmt zmUKs7M+SzC{oH>NSs54@6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dc zykO3*KpO@I2DT(`cNYc&h6N1L-1XB-85kHi3p^r=85p>QL70(Y)*J~21_pUg7sn8Z z%gHf&Dn8b;DLLlk=qNk79+5h6#DP)5;w*#EPPPw$I%gUg7#J8lUHx3vIVCg!0DAQ= AsQ>@~ literal 0 HcmV?d00001 diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index fddc7dd6..a92d3070 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -497,7 +497,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10401] = Line(QImage(":/marine/cable.png")); _lines[0x10402] = Line(QImage(":/marine/pipeline.png")); - _lines[0x10403] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DotLine)); + _lines[0x10403] = Line(QPen(QColor(0, 0, 0), 2, Qt::DotLine)); _lines[0x10404] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); _lines[0x110404] = Line(QImage(":/marine/fishing-farm-line.png")); _lines[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); @@ -505,7 +505,9 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x110406] = Line(QImage(":/marine/cable-area-line.png")); _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); + _lines[0x110407] = Line(QImage(":/marine/dumping-ground-line.png")); _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); + _lines[0x110408] = Line(QImage(":/marine/minefield-line.png")); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x1040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine)); _lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2)); @@ -558,6 +560,8 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x11060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine)); _lines[0x1060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine)); _lines[0x1060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); + _lines[0x1060e] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); + _lines[0x11060e] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); _lines[0x10611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); } From 7f491330b1617766436668235077d5e0106127cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 18 May 2025 21:42:57 +0200 Subject: [PATCH 30/35] Dashed misc/cartographic lines --- src/map/IMG/mapdata.h | 3 ++- src/map/IMG/rastertile.cpp | 9 ++++++--- src/map/IMG/rgnfile.cpp | 7 ++++++- src/map/IMG/style.cpp | 16 ++++++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/map/IMG/mapdata.h b/src/map/IMG/mapdata.h index 1ad4443b..a9fc0eac 100644 --- a/src/map/IMG/mapdata.h +++ b/src/map/IMG/mapdata.h @@ -34,7 +34,8 @@ public: enum Flags { OneWay = 1, Invert = 2, - Direction = 4 + Direction = 4, + Dashed = 8 }; /* QPointF insted of Coordinates for performance reasons (no need to diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index cd840aa6..15e50332 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -188,9 +188,12 @@ void RasterTile::drawPolygons(QPainter *painter, static quint32 lineType(quint32 type, quint32 flags) { - if (Style::isMiscLine(type)) - return type | (flags & 0xFF000000); - else if (flags & MapData::Poly::Direction) + if (Style::isMiscLine(type)) { + if (flags & MapData::Poly::Dashed) + return type | (flags & 0xFF000000) | 1<<20; + else + return type | (flags & 0xFF000000); + } else if (flags & MapData::Poly::Direction) return type | 1<<20; else return type; diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index ab7599d2..bf5859fb 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -255,14 +255,19 @@ bool RGNFile::readLineInfo(Handle &hdl, quint8 flags, quint32 size, 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 + } else { + if ((flags >> 4) & 3) + line->flags |= MapData::Poly::Dashed; return (!size); + } } bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index a92d3070..8d01ce84 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -530,21 +530,37 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x110508] = 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[0x10603] = Line(QImage(":/marine/international-maritime-boundary.png")); _lines[0x110603] = Line(QImage(":/marine/international-maritime-boundary.png")); From 744cfde08f7aa7abdb4eccf6eb6d86218bc1d5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 18 May 2025 21:50:56 +0200 Subject: [PATCH 31/35] Refactoring --- src/map/IMG/rastertile.cpp | 2 +- src/map/IMG/rgnfile.cpp | 2 +- src/map/IMG/style.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 15e50332..55b04082 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -188,7 +188,7 @@ void RasterTile::drawPolygons(QPainter *painter, static quint32 lineType(quint32 type, quint32 flags) { - if (Style::isMiscLine(type)) { + if (Style::isCartographicLine(type)) { if (flags & MapData::Poly::Dashed) return type | (flags & 0xFF000000) | 1<<20; else diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index bf5859fb..76b58ac7 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -319,7 +319,7 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, if (point && Style::isLabelPoint(point->type)) point->flags |= (flags & 0xf)<<20; - if (line && Style::isMarineLine(line->type)) + if (line && Style::isStyledLine(line->type)) readLineInfo(hdl, flags, rs, line); return seek(hdl, off + rs); diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 755133c3..5f4955fc 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) @@ -156,12 +158,10 @@ public: {return type == 0x10500;} static bool isMarinePoint(quint32 type) {return type >= 0x10100 && type < 0x10a00;} - static bool isMarineLine(quint32 type) + static bool isStyledLine(quint32 type) {return type >= 0x10400 && type < 0x10700;} - static bool isMiscLine(quint32 type) + static bool isCartographicLine(quint32 type) {return type == 0x10601;} - static bool isMarina(quint32 type) - {return type == 0x10703;} static bool hasColorset(quint32 type) {return (isBuoy(type) && !(type == 0x1020d || type >= 0x10216));} From 93fc1907482796e4454b981f1acb4627b550960e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 19 May 2025 09:18:32 +0200 Subject: [PATCH 32/35] Recommended routes style --- src/map/IMG/rastertile.cpp | 4 +++- src/map/IMG/rgnfile.cpp | 21 +++++++++++++++++++-- src/map/IMG/rgnfile.h | 4 +++- src/map/IMG/style.cpp | 1 + src/map/IMG/style.h | 2 ++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 55b04082..5432c976 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -193,7 +193,9 @@ static quint32 lineType(quint32 type, quint32 flags) return type | (flags & 0xFF000000) | 1<<20; else return type | (flags & 0xFF000000); - } else if (flags & MapData::Poly::Direction) + } else if (Style::isRecommendedRoute(type)) + return (flags & MapData::Poly::Dashed) ? type | 1<<20 : type; + else if (flags & MapData::Poly::Direction) return type | 1<<20; else return type; diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 76b58ac7..fa48bb11 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -244,7 +244,7 @@ bool RGNFile::readLabel(Handle &hdl, LBLFile *lbl, Handle &lblHdl, return true; } -bool RGNFile::readLineInfo(Handle &hdl, quint8 flags, quint32 size, +bool RGNFile::readLineStyle(Handle &hdl, quint8 flags, quint32 size, MapData::Poly *line) const { line->flags |= (flags & 0xf)<<24; @@ -270,6 +270,21 @@ bool RGNFile::readLineInfo(Handle &hdl, quint8 flags, quint32 size, } } +bool RGNFile::readRecommendedRoute(Handle &hdl, quint8 flags, quint32 size, + MapData::Poly *line) const +{ + Q_UNUSED(flags); + quint32 val; + + if (!(size >= 1 && readUInt8(hdl, val))) + return false; + + if (val & 2) + line->flags |= MapData::Poly::Dashed; + + return true; +} + bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, void *object, LBLFile *lbl, Handle &lblHdl) const { @@ -320,7 +335,9 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, point->flags |= (flags & 0xf)<<20; if (line && Style::isStyledLine(line->type)) - readLineInfo(hdl, flags, rs, line); + readLineStyle(hdl, flags, rs, line); + if (line && Style::isRecommendedRoute(line->type)) + readRecommendedRoute(hdl, flags, rs, line); return seek(hdl, off + rs); } diff --git a/src/map/IMG/rgnfile.h b/src/map/IMG/rgnfile.h index b6b6b576..5016e098 100644 --- a/src/map/IMG/rgnfile.h +++ b/src/map/IMG/rgnfile.h @@ -69,7 +69,9 @@ private: MapData::Point *point) const; bool readLightInfo(Handle &hdl, quint8 flags, quint32 size, MapData::Point *point) const; - bool readLineInfo(Handle &hdl, quint8 flags, quint32 size, + 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; diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 8d01ce84..5b92f5b6 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -490,6 +490,7 @@ 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)); diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 5f4955fc..93ed37bb 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -162,6 +162,8 @@ public: {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));} From 8ba97e65f52bc3a6920630d57ca385ff88f202b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 19 May 2025 23:00:44 +0200 Subject: [PATCH 33/35] Properly parse the whole recommended route data --- src/map/IMG/rgnfile.cpp | 66 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index fa48bb11..362ce206 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -273,16 +273,70 @@ bool RGNFile::readLineStyle(Handle &hdl, quint8 flags, quint32 size, bool RGNFile::readRecommendedRoute(Handle &hdl, quint8 flags, quint32 size, MapData::Poly *line) const { - Q_UNUSED(flags); - quint32 val; + quint32 f2; - if (!(size >= 1 && readUInt8(hdl, val))) + if (!(size >= 1 && readUInt8(hdl, f2))) return false; + size--; - if (val & 2) - line->flags |= MapData::Poly::Dashed; + if ((flags >> 5) == 7) { + quint32 f3; + if (!(size >= 1 && readUInt8(hdl, f3))) + return false; + size--; - return true; + 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, From f588bad785f2845f9bad3303d17263becd9d93c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 19 May 2025 23:01:35 +0200 Subject: [PATCH 34/35] Use different flags for the "dashed" and "directional" line styles --- src/map/IMG/rastertile.cpp | 2 +- src/map/IMG/style.cpp | 47 ++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 5432c976..732d7cd4 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -196,7 +196,7 @@ static quint32 lineType(quint32 type, quint32 flags) } else if (Style::isRecommendedRoute(type)) return (flags & MapData::Poly::Dashed) ? type | 1<<20 : type; else if (flags & MapData::Poly::Direction) - return type | 1<<20; + return type | 2<<20; else return type; } diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 5b92f5b6..7f6421b4 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -500,35 +500,38 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10402] = Line(QImage(":/marine/pipeline.png")); _lines[0x10403] = Line(QPen(QColor(0, 0, 0), 2, Qt::DotLine)); _lines[0x10404] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); - _lines[0x110404] = Line(QImage(":/marine/fishing-farm-line.png")); + _lines[0x210404] = Line(QImage(":/marine/fishing-farm-line.png")); _lines[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110405] = Line(QImage(":/marine/pipeline-area-line.png")); + _lines[0x210405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110406] = Line(QImage(":/marine/cable-area-line.png")); + _lines[0x210406] = Line(QImage(":/marine/cable-area-line.png")); _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); - _lines[0x110407] = Line(QImage(":/marine/dumping-ground-line.png")); + _lines[0x210407] = Line(QImage(":/marine/dumping-ground-line.png")); _lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); - _lines[0x110408] = Line(QImage(":/marine/minefield-line.png")); + _lines[0x210408] = Line(QImage(":/marine/minefield-line.png")); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); + _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[0x110501] = Line(QImage(":/marine/noanchor-line.png")); + _lines[0x210501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10502] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110502] = Line(QImage(":/marine/nofishing-line.png")); + _lines[0x210502] = Line(QImage(":/marine/nofishing-line.png")); _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110503] = Line(QImage(":/marine/entry-prohibited-line.png")); + _lines[0x210503] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110504] = Line(QImage(":/marine/entry-prohibited-line.png")); + _lines[0x210504] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10505] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110505] = Line(QImage(":/marine/noanchor-line.png")); + _lines[0x210505] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10506] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine)); - _lines[0x110506] = Line(QImage(":/marine/nature-reserve-line.png")); + _lines[0x210506] = Line(QImage(":/marine/nature-reserve-line.png")); _lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110507] = Line(QImage(":/marine/safety-zone-line.png")); + _lines[0x210507] = Line(QImage(":/marine/safety-zone-line.png")); _lines[0x10508] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine)); - _lines[0x110508] = Line(QImage(":/marine/minefield-line.png")); + _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)); @@ -563,23 +566,27 @@ void Style::defaultLineStyle(qreal ratio) _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[0x110603] = 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[0x110604] = Line(QImage(":/marine/straight-territorial-sea-baseline.png")); + _lines[0x210604] = Line(QImage(":/marine/straight-territorial-sea-baseline.png")); _lines[0x10605] = Line(QImage(":/marine/seaward-limit-of-territorial-sea.png")); - _lines[0x110605] = 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[0x110606] = Line(QImage(":/marine/anchor-line.png")); + _lines[0x210606] = Line(QImage(":/marine/anchor-line.png")); _lines[0x10608] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); - _lines[0x110608] = Line(QImage(":/marine/fishing-line.png")); + _lines[0x210608] = Line(QImage(":/marine/fishing-line.png")); _lines[0x1060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine)); - _lines[0x11060b] = 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[0x11060e] = 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) From 23e293f39a4e92c37fba9c0fdffb0756faf10a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 20 May 2025 08:40:47 +0200 Subject: [PATCH 35/35] Radio reporting points --- gpxsee.qrc | 1 + icons/map/marine/radio-call-garmin.png | Bin 0 -> 290 bytes src/map/IMG/rgnfile.cpp | 2 +- src/map/IMG/style.cpp | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 icons/map/marine/radio-call-garmin.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 17df2d13..735dbf77 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -334,6 +334,7 @@ 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/radio-call-garmin.png b/icons/map/marine/radio-call-garmin.png new file mode 100644 index 0000000000000000000000000000000000000000..9d3e44b4d27969ed3d5ed803bec4c6988c90ba09 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4wWz`#)S`biA~0|R4mkh>G(&67Iy3=9k`>5jgR z3=A9lx&I`xGB7YGBzpw;GB8xBF)%c=FfjaLU|?u?!N5>zz`*b-fq}tl1_Oh5!JJ)z zHVh05Y)RhkE(`_?3mBxi>!+78FfecyctjR6Fz_7#VaBQ2e9{aI43(ZPjv*T7=LYTO zJD|W}(-D1nA+!8b@y~%evUlDFNjo1{a!;i|&cCTS^z}V;EtA_K6Vrp9wTHeAWQ#xe zKxB0pL&l;ax2L?NfeYUYH*9-#a8+r3@s*6WgW8dQZ$4pYFg_YucCPI6qglz1&uY5{ m?!2t{_wMCut{2X|wY^;sHPM4jER}(Qfx*+&&t;ucLK6T7En>O= literal 0 HcmV?d00001 diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 362ce206..829b99c0 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -374,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)) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 7f6421b4..0c492014 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -909,6 +909,7 @@ void Style::defaultPointStyle(qreal ratio) _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")); }