From eeee16ff9b2cce8f95ae388d367c649558a0e2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 20 Dec 2024 16:14:36 +0100 Subject: [PATCH] Special anchorage areas --- gpxsee.qrc | 3 +++ icons/map/marine/24h-anchorage.png | Bin 0 -> 348 bytes icons/map/marine/dw-anchorage.png | Bin 0 -> 296 bytes icons/map/marine/tanker-anchorage.png | Bin 0 -> 413 bytes src/map/ENC/mapdata.cpp | 9 ++++++++- src/map/ENC/style.cpp | 14 ++++++++++++-- 6 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 icons/map/marine/24h-anchorage.png create mode 100644 icons/map/marine/dw-anchorage.png create mode 100644 icons/map/marine/tanker-anchorage.png diff --git a/gpxsee.qrc b/gpxsee.qrc index f5b3746f..b75d8f19 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -207,6 +207,9 @@ icons/map/marine/eddies.png icons/map/marine/dome.png icons/map/marine/radar-reflector.png + icons/map/marine/24h-anchorage.png + icons/map/marine/dw-anchorage.png + icons/map/marine/tanker-anchorage.png diff --git a/icons/map/marine/24h-anchorage.png b/icons/map/marine/24h-anchorage.png new file mode 100644 index 0000000000000000000000000000000000000000..f2a840d388b4253246543f28946586580e48bded GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-q!3HG#?#OKdQfx`y?k)`fL2$v|<&%LToCO|{ z#Xud`L734=V|E2l@Q6|N`}|s$BbBRTUo_jP$9W*?HC#nOKD{;R{LXJ?ssuSwpx@#e-=;#1^S z=-leq{o6xz+N%{N5r#Tc^Gr?QSI_&-0q^chtdt3!VbkQGb!+`L sA;HPj^}9p%G5wf%>HCHD_FVdQ&MBb@0Ja2`G5`Po literal 0 HcmV?d00001 diff --git a/icons/map/marine/dw-anchorage.png b/icons/map/marine/dw-anchorage.png new file mode 100644 index 0000000000000000000000000000000000000000..78c28e182c59ab77cd77ddfb4289efab8265b1d6 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^GC<77!3HF4glkxU6kC$Fy9>jA5L~c#`DCC7XMsm# zF;K^K5N34Jm|X!BJmKl$7-DgH@05dl%?2E8jYnMdtxr0a^6#+|*&dr^#=HB*lFS9? ze4e^_{`}d%P|)NlFjavoJVG<2^OC6RidO|TH=Q>qcnhgS8m`%BS@bi|d;eEG$0`O7 zKU-$^d28lhu7 literal 0 HcmV?d00001 diff --git a/icons/map/marine/tanker-anchorage.png b/icons/map/marine/tanker-anchorage.png new file mode 100644 index 0000000000000000000000000000000000000000..a0baf59ffacb979927472ac3e20df8027d10f296 GIT binary patch literal 413 zcmV;O0b>4%P)2$rz*X4{IQ@`yu{$(4A5jOhR zVEFe5H}VqpVx>>*(NsaFtZr&UL^>_1&->`>`1`_+&!)`*m=)eS=c+s;00000NkvXX Hu0mjfFgCb! literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index a0d2e63c..79fd75f6 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -176,7 +176,14 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) uint baseType = polygon->type()>>16; if (!polygon->label().isEmpty() || baseType == TSSLPT || baseType == RCTLPT - || baseType == I_TRNBSN || polygon->type() == SUBTYPE(I_BERTHS, 6)) + || baseType == I_TRNBSN + || polygon->type() == SUBTYPE(ACHARE, 2) + || polygon->type() == SUBTYPE(ACHARE, 3) + || polygon->type() == SUBTYPE(ACHARE, 9) + || polygon->type() == SUBTYPE(I_ACHARE, 2) + || polygon->type() == SUBTYPE(I_ACHARE, 3) + || polygon->type() == SUBTYPE(I_ACHARE, 9) + || polygon->type() == SUBTYPE(I_BERTHS, 6)) points->append(MapData::Point(polygon->type(), polygon->bounds().center(), polygon->label(), polygon->param())); diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 4c6814f2..1f94eb2f 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -355,8 +355,6 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(I_RDOCAL, 3)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[SUBTYPE(I_RDOCAL, 4)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[TYPE(PYLONS)] = Point(QImage(":/marine/pylon.png")); - _points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"), - Small); _points[SUBTYPE(WATTUR, 1)] = Point(QImage(":/marine/breakers.png")); _points[SUBTYPE(WATTUR, 2)] = Point(QImage(":/marine/eddies.png")); _points[SUBTYPE(WATTUR, 3)] = Point(QImage(":/marine/overfalls.png")); @@ -370,6 +368,18 @@ void Style::pointStyle(qreal ratio) _points[TYPE(SEAARE)].setHaloColor(QColor()); _points[TYPE(RADRFL)] = Point(QImage(":/marine/radar-reflector.png")); + _points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"), + Small); + _points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"), + Small); + _points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"), + Small); + _points[SUBTYPE(ACHARE, 9)] = Point(QImage(":/marine/24h-anchorage.png"), + Small); + _points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)]; + _points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)]; + _points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)]; + _points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg", ratio), Small); _points[SUBTYPE(SMCFAC, 11)] = Point(svg2img(":/POI/pharmacy-11.svg",