1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Do not outline soundings

This commit is contained in:
Martin Tůma 2022-11-05 17:43:32 +01:00
parent d215e881f6
commit 67209c4ad5
3 changed files with 10 additions and 5 deletions

View File

@ -133,12 +133,14 @@ void RasterTile::processPoints(QList<TextItem*> &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

View File

@ -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"));

View File

@ -4,9 +4,13 @@
#include <QPen>
#include <QBrush>
#include <QMap>
#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<uint> &drawOrder() const {return _drawOrder;}
static bool isSounding(quint32 type)
{return type == TYPE(SOUNDG);}
private:
void defaultPolygonStyle();
void defaultLineStyle();