From ed7fc5fba345dfda3629ded9d34f7c71ccaa7f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 1 May 2025 07:59:02 +0200 Subject: [PATCH] Properly render ACHARE labels --- src/map/ENC/mapdata.cpp | 5 ++++- src/map/ENC/style.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 2e3a1179..51b5cdcd 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -85,6 +85,8 @@ static QMap orderMapInit() map.insert(TYPE(LNDELV), 44); map.insert(TYPE(SMCFAC), 45); map.insert(TYPE(BUISGL), 46); + map.insert(TYPE(ACHARE), 47); + map.insert(TYPE(I_ACHARE), 47); map.insert(TYPE(I_DISMAR), 0xFFFFFFFE); map.insert(TYPE(SOUNDG), 0xFFFFFFFF); @@ -192,7 +194,8 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) || 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) - || type == SUBTYPE(I_BERTHS, 6) + || type == SUBTYPE(I_ACHARE, 10) || type == SUBTYPE(I_ACHARE, 11) + || 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, 4) || type == SUBTYPE(I_RESARE, 4) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 113e3f4c..6d8f7d67 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -412,15 +412,42 @@ void Style::pointStyle(qreal ratio) Small); _points[SUBTYPE(I_BERTHS, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[SUBTYPE(I_BERTHS, 6)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 1)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 2)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 2)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 3)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 3)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 4)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 4)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 5)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 5)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 6)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 7)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 7)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 8)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 8)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 9)] = Point(QImage(":/marine/24h-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 9)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 9)].setHaloColor(QColor()); + _points[SUBTYPE(I_ACHARE, 1)] = _points[SUBTYPE(ACHARE, 1)]; _points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)]; _points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)]; + _points[SUBTYPE(I_ACHARE, 4)] = _points[SUBTYPE(ACHARE, 4)]; + _points[SUBTYPE(I_ACHARE, 5)] = _points[SUBTYPE(ACHARE, 5)]; + _points[SUBTYPE(I_ACHARE, 6)] = _points[SUBTYPE(ACHARE, 6)]; + _points[SUBTYPE(I_ACHARE, 7)] = _points[SUBTYPE(ACHARE, 7)]; + _points[SUBTYPE(I_ACHARE, 8)] = _points[SUBTYPE(ACHARE, 8)]; _points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)]; + _points[SUBTYPE(I_ACHARE, 10)] = _points[SUBTYPE(I_ACHARE, 1)]; + _points[SUBTYPE(I_ACHARE, 11)] = _points[SUBTYPE(I_ACHARE, 1)]; + _points[SUBTYPE(I_ACHARE, 12)] = _points[SUBTYPE(I_ACHARE, 1)]; _points[SUBTYPE(RESARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[SUBTYPE(RESARE, 1)].setHaloColor(QColor()); _points[SUBTYPE(RESARE, 2)] = _points[SUBTYPE(RESARE, 1)];