Skip to content

Commit

Permalink
Improved area labels placement
Browse files Browse the repository at this point in the history
  • Loading branch information
tumic0 committed Nov 10, 2024
1 parent c033de5 commit 7c1ed27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/map/mapsforge/rastertile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
const QFont *font = p.ti ? &p.ti->font() : 0;
const QColor *color = p.ti ? &p.ti->fillColor() : 0;
const QColor *hColor = p.ti ? haloColor(p.ti) : 0;
QPointF pos = p.p->path->labelPos.isNull()
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);

QPainterPath rp;
rp.addRect(_rect.toRectF());
QPointF pos = p.p->path->labelPos.isNull()
? centroid(p.p->pp & rp) : ll2xy(p.p->path->labelPos);
if (p.ti && p.lbl && set.contains(*p.lbl))
continue;

Expand Down

0 comments on commit 7c1ed27

Please sign in to comment.