From 67209c4ad584481f40db96e204cc0691b4f14345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 5 Nov 2022 17:43:32 +0100 Subject: [PATCH] Do not outline soundings --- src/map/ENC/rastertile.cpp | 4 +++- src/map/ENC/style.cpp | 4 ---- src/map/ENC/style.h | 7 +++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index 80ce1d1c..839ada1f 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -133,12 +133,14 @@ void RasterTile::processPoints(QList &textItems) const QImage *img = style.img().isNull() ? 0 : &style.img(); const QFont *fnt = font(style.textFontSize()); const QColor *color = &style.textColor(); + const QColor *hColor = Style::isSounding(point->type()) + ? 0 : &haloColor; if ((!label || !fnt) && !img) continue; TextPointItem *item = new TextPointItem(ll2xy(point->pos()).toPoint(), - label, fnt, img, color, &haloColor, 0, ICON_PADDING); + label, fnt, img, color, hColor, 0, ICON_PADDING); if (item->isValid() && !item->collides(textItems)) textItems.append(item); else diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index ef139bd7..d5101302 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -1,11 +1,7 @@ -#include "objects.h" #include "style.h" using namespace ENC; -#define TYPE(t) ((t)<<16) -#define SUBTYPE(t, s) (((t)<<16)|(s)) - void Style::defaultPolygonStyle() { _polygons[TYPE(M_COVR)] = Polygon(QBrush("#ffffff")); diff --git a/src/map/ENC/style.h b/src/map/ENC/style.h index ebf97a14..41538d8f 100644 --- a/src/map/ENC/style.h +++ b/src/map/ENC/style.h @@ -4,9 +4,13 @@ #include #include #include +#include "objects.h" namespace ENC { +#define TYPE(t) ((t)<<16) +#define SUBTYPE(t, s) (((t)<<16)|(s)) + class Style { public: @@ -83,6 +87,9 @@ public: const Point &point(quint32 type) const; const QVector &drawOrder() const {return _drawOrder;} + static bool isSounding(quint32 type) + {return type == TYPE(SOUNDG);} + private: void defaultPolygonStyle(); void defaultLineStyle();