summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-11-10 13:54:37 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-11-10 15:24:16 (GMT)
commit620499fdb830ced95e0ab3b4b8f635aa59db13d6 (patch)
tree8b9780f686ae169925c0eb62c2d05ff84fcc1da6
parent070c60b5d9901d61a1758459b51095e5355da113 (diff)
More efficient street rendering:
Previously in order to draw a street the same street geometry was fully reprojected and drawn up to three times: For the Outline, Inline and Label. This commit introduces means in ClipPainter and GeoPainter to precalculate the projected geometry of a GeoDataLineString. The result is used to render the outline, inline and to draw the labels without doing a superfluous "transparent" redrawing of the lineString (as it was previously done). This also saves several pen-changes. On a busy Level 11 area this commit improves performance by about 20% (measured on a desktop machine).
-rw-r--r--src/lib/marble/ClipPainter.cpp5
-rw-r--r--src/lib/marble/ClipPainter.h3
-rw-r--r--src/lib/marble/GeoPainter.cpp184
-rw-r--r--src/lib/marble/GeoPainter.h28
-rw-r--r--src/lib/marble/geodata/graphicsitem/AbstractGeoPolygonGraphicsItem.cpp13
-rw-r--r--src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp75
-rw-r--r--src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h8
7 files changed, 190 insertions, 126 deletions
diff --git a/src/lib/marble/ClipPainter.cpp b/src/lib/marble/ClipPainter.cpp
index 23f3e40..5b72b26 100644
--- a/src/lib/marble/ClipPainter.cpp
+++ b/src/lib/marble/ClipPainter.cpp
@@ -291,6 +291,11 @@ void ClipPainter::drawPolyline(const QPolygonF & polygon, QVector<QPointF>& labe
}
}
+void ClipPainter::labelPosition(const QPolygonF & polygon, QVector<QPointF>& labelNodes,
+ LabelPositionFlags labelPositionFlags) {
+ d->labelPosition(polygon, labelNodes, labelPositionFlags);
+}
+
void ClipPainter::setPen(const QColor &color) {
if (d->m_debugBatchRender) {
qDebug() << Q_FUNC_INFO;
diff --git a/src/lib/marble/ClipPainter.h b/src/lib/marble/ClipPainter.h
index cfb81a4..101bcc1 100644
--- a/src/lib/marble/ClipPainter.h
+++ b/src/lib/marble/ClipPainter.h
@@ -65,6 +65,9 @@ class MARBLE_EXPORT ClipPainter : public QPainter
void drawPolyline( const QPolygonF &, QVector<QPointF>& labelNodes,
LabelPositionFlags labelPositionFlag = LineCenter );
+ void labelPosition(const QPolygonF & polygon, QVector<QPointF>& labelNodes,
+ LabelPositionFlags labelPositionFlags);
+
void setPen(const QColor &);
void setPen(const QPen & pen);
void setPen(Qt::PenStyle style);
diff --git a/src/lib/marble/GeoPainter.cpp b/src/lib/marble/GeoPainter.cpp
index 4a5859b..e7f5f1c 100644
--- a/src/lib/marble/GeoPainter.cpp
+++ b/src/lib/marble/GeoPainter.cpp
@@ -546,6 +546,23 @@ QRegion GeoPainter::regionFromPixmapRect(const GeoDataCoordinates & centerCoordi
return regions;
}
+void GeoPainter::polygonsFromLineString( const GeoDataLineString &lineString,
+ QVector<QPolygonF*> &polygons )
+{
+ // Immediately leave this method now if:
+ // - the object is not visible in the viewport or if
+ // - the size of the object is below the resolution of the viewport
+ if ( ! d->m_viewport->viewLatLonAltBox().intersects( lineString.latLonAltBox() ) ||
+ ! d->m_viewport->resolves( lineString.latLonAltBox() )
+ )
+ {
+ // mDebug() << "LineString doesn't get displayed on the viewport";
+ return;
+ }
+
+ d->m_viewport->screenCoordinates( lineString, polygons );
+}
+
void GeoPainter::drawPolyline ( const GeoDataLineString & lineString,
const QString& labelText,
@@ -561,25 +578,46 @@ void GeoPainter::drawPolyline ( const GeoDataLineString & lineString,
return;
}
- // Immediately leave this method now if:
- // - the object is not visible in the viewport or if
- // - the size of the object is below the resolution of the viewport
- if ( ! d->m_viewport->viewLatLonAltBox().intersects( lineString.latLonAltBox() ) ||
- ! d->m_viewport->resolves( lineString.latLonAltBox() )
- )
- {
- // mDebug() << "LineString doesn't get displayed on the viewport";
- return;
+ QVector<QPolygonF*> polygons;
+ polygonsFromLineString(lineString, polygons);
+ if (polygons.empty()) return;
+
+ foreach(const QPolygonF* itPolygon, polygons) {
+ ClipPainter::drawPolyline(*itPolygon);
}
- QVector<QPolygonF*> polygons;
- d->m_viewport->screenCoordinates( lineString, polygons );
+ drawLabelsForPolygons(polygons,
+ labelText,
+ labelPositionFlags,
+ labelColor);
+
+ qDeleteAll( polygons );
+}
+
+void GeoPainter::drawLabelsForPolygons( const QVector<QPolygonF*> &polygons,
+ const QString& labelText,
+ LabelPositionFlags labelPositionFlags,
+ const QColor& labelColor )
+{
+ QPen const oldPen = pen();
if (labelPositionFlags.testFlag(FollowLine)) {
const qreal maximumLabelFontSize = 20;
qreal fontSize = pen().widthF() * 0.45;
fontSize = qMin( fontSize, maximumLabelFontSize );
+ if (fontSize < 6.0 || labelColor == "transparent") {
+ return;
+ }
+ QFont font = this->font();
+ font.setPointSizeF(fontSize);
+ setFont(font);
+ int labelWidth = fontMetrics().width( labelText );
+ if (labelText.size() < 20) {
+ labelWidth *= (20.0 / labelText.size());
+ }
+ setPen(labelColor);
+
QVector<QPointF> labelNodes;
QRectF viewportRect = QRectF(QPointF(0, 0), d->m_viewport->size());
foreach( QPolygonF* itPolygon, polygons ) {
@@ -588,94 +626,78 @@ void GeoPainter::drawPolyline ( const GeoDataLineString & lineString,
}
labelNodes.clear();
- ClipPainter::drawPolyline( *itPolygon, labelNodes, labelPositionFlags );
- save();
+ QPainterPath path;
+ path.addPolygon(*itPolygon);
+ qreal pathLength = path.length();
+ if (pathLength == 0) continue;
- if (fontSize >= 6.0) {
- QFont font = this->font();
- font.setPointSizeF(fontSize);
- setFont(font);
- int labelWidth = fontMetrics().width( labelText );
- if (labelText.size() < 20) {
- labelWidth *= (20.0 / labelText.size());
- }
+ int maxNumLabels = static_cast<int>(pathLength / labelWidth);
- QPainterPath path;
- path.addPolygon(*itPolygon);
- qreal pathLength = path.length();
- if (pathLength == 0) continue;
+ if (maxNumLabels > 0) {
+ qreal textRelativeLength = labelWidth / pathLength;
+ int numLabels = 1;
+ if (maxNumLabels > 1) {
+ numLabels = maxNumLabels/2;
+ }
+ qreal offset = (1.0 - numLabels*textRelativeLength)/numLabels;
+ qreal startPercent = offset/2.0;
+
+ for (int k = 0; k < numLabels; ++k, startPercent += textRelativeLength + offset) {
+ QPointF point = path.pointAtPercent(startPercent);
+ QPointF endPoint = path.pointAtPercent(startPercent + textRelativeLength);
+
+ if ( viewport().contains(point.toPoint()) || viewport().contains(endPoint.toPoint()) ) {
+ qreal angle = -path.angleAtPercent(startPercent);
+ qreal angle2 = -path.angleAtPercent(startPercent + textRelativeLength);
+ angle = GeoPainterPrivate::normalizeAngle(angle);
+ angle2 = GeoPainterPrivate::normalizeAngle(angle2);
+ bool upsideDown = angle > 90.0 && angle < 270.0;
+
+ if ( qAbs(angle - angle2) < 3.0 ) {
+ if ( upsideDown ) {
+ angle += 180.0;
+ point = path.pointAtPercent(startPercent + textRelativeLength);
+ }
- int maxNumLabels = static_cast<int>(pathLength / labelWidth);
+ d->drawTextRotated(point, angle, labelText);
+ } else {
+ for (int i = 0; i < labelText.length(); ++i) {
+ qreal currentGlyphTextLength = fontMetrics().width(labelText.left(i)) / pathLength;
- if (maxNumLabels > 0) {
- qreal textRelativeLength = labelWidth / pathLength;
- int numLabels = 1;
- if (maxNumLabels > 1) {
- numLabels = maxNumLabels/2;
- }
- qreal offset = (1.0 - numLabels*textRelativeLength)/numLabels;
- qreal startPercent = offset/2.0;
-
- setPen(labelColor);
-
- for (int k = 0; k < numLabels; ++k, startPercent += textRelativeLength + offset) {
- QPointF point = path.pointAtPercent(startPercent);
- QPointF endPoint = path.pointAtPercent(startPercent + textRelativeLength);
-
- if ( viewport().contains(point.toPoint()) || viewport().contains(endPoint.toPoint()) ) {
- qreal angle = -path.angleAtPercent(startPercent);
- qreal angle2 = -path.angleAtPercent(startPercent + textRelativeLength);
- angle = GeoPainterPrivate::normalizeAngle(angle);
- angle2 = GeoPainterPrivate::normalizeAngle(angle2);
- bool upsideDown = angle > 90.0 && angle < 270.0;
-
- if ( qAbs(angle - angle2) < 3.0 ) {
- if ( upsideDown ) {
- angle += 180.0;
- point = path.pointAtPercent(startPercent + textRelativeLength);
+ if ( !upsideDown ) {
+ angle = -path.angleAtPercent(startPercent + currentGlyphTextLength);
+ point = path.pointAtPercent(startPercent + currentGlyphTextLength);
}
-
- d->drawTextRotated(point, angle, labelText);
- } else {
- for (int i = 0; i < labelText.length(); ++i) {
- qreal currentGlyphTextLength = fontMetrics().width(labelText.left(i)) / pathLength;
-
- if ( !upsideDown ) {
- angle = -path.angleAtPercent(startPercent + currentGlyphTextLength);
- point = path.pointAtPercent(startPercent + currentGlyphTextLength);
- }
- else {
- angle = -path.angleAtPercent(startPercent + textRelativeLength - currentGlyphTextLength) + 180;
- point = path.pointAtPercent(startPercent + textRelativeLength - currentGlyphTextLength);
- }
-
- d->drawTextRotated(point, angle, labelText.at(i));
+ else {
+ angle = -path.angleAtPercent(startPercent + textRelativeLength - currentGlyphTextLength) + 180;
+ point = path.pointAtPercent(startPercent + textRelativeLength - currentGlyphTextLength);
}
+
+ d->drawTextRotated(point, angle, labelText.at(i));
}
}
}
}
}
- restore();
}
} else {
+ setPen(labelColor);
+
int labelWidth = fontMetrics().width( labelText );
int labelAscent = fontMetrics().ascent();
QVector<QPointF> labelNodes;
foreach( QPolygonF* itPolygon, polygons ) {
labelNodes.clear();
- ClipPainter::drawPolyline( *itPolygon, labelNodes, labelPositionFlags );
+ ClipPainter::labelPosition( *itPolygon, labelNodes, labelPositionFlags );
if (!labelNodes.isEmpty()) {
- QPen const oldPen = pen();
- setPen(labelColor);
foreach ( const QPointF& labelNode, labelNodes ) {
QPointF labelPosition = labelNode + QPointF( 3.0, -2.0 );
// FIXME: This is a Q&D fix.
qreal xmax = viewport().width() - 10.0 - labelWidth;
- if ( labelPosition.x() > xmax ) labelPosition.setX( xmax );
+ if ( labelPosition.x() > xmax ) labelPosition.setX( xmax );
qreal ymin = 10.0 + labelAscent;
if ( labelPosition.y() < ymin ) labelPosition.setY( ymin );
qreal ymax = viewport().height() - 10.0 - labelAscent;
@@ -683,27 +705,17 @@ void GeoPainter::drawPolyline ( const GeoDataLineString & lineString,
drawText( QRectF( labelPosition, fontMetrics().size( 0, labelText) ), labelText );
}
- setPen(oldPen);
}
}
}
- qDeleteAll( polygons );
+ setPen(oldPen);
}
-
void GeoPainter::drawPolyline(const GeoDataLineString& lineString)
{
- // Immediately leave this method now if:
- // - the object is not visible in the viewport or if
- // - the size of the object is below the resolution of the viewport
- if (!d->m_viewport->viewLatLonAltBox().intersects(lineString.latLonAltBox()) ||
- !d->m_viewport->resolves(lineString.latLonAltBox())) {
- // mDebug() << "LineString doesn't get displayed on the viewport";
- return;
- }
-
QVector<QPolygonF*> polygons;
- d->m_viewport->screenCoordinates(lineString, polygons);
+ polygonsFromLineString(lineString, polygons);
+ if (polygons.empty()) return;
foreach(const QPolygonF* itPolygon, polygons) {
ClipPainter::drawPolyline(*itPolygon);
diff --git a/src/lib/marble/GeoPainter.h b/src/lib/marble/GeoPainter.h
index 27d93a7..60b0571 100644
--- a/src/lib/marble/GeoPainter.h
+++ b/src/lib/marble/GeoPainter.h
@@ -305,6 +305,20 @@ class MARBLE_EXPORT GeoPainter : public ClipPainter
int margin = 0) const;
/*!
+ \brief Helper method for safe and quick linestring conversion.
+
+ In general drawPolyline() should be used instead. However
+ in situations where the same linestring is supposed to be
+ drawn multiple times it's a good idea to cache the
+ screen polygons using this method.
+
+ \see GeoDataLineString
+*/
+ void polygonsFromLineString( const GeoDataLineString &lineString,
+ QVector<QPolygonF*> &polygons );
+
+
+/*!
\brief Draws a given line string (a "polyline") with a label.
The \a lineString is drawn using the current pen. It's possible to
@@ -321,6 +335,19 @@ class MARBLE_EXPORT GeoPainter : public ClipPainter
const QColor& labelcolor = Qt::black);
/*!
+ \brief Draws Labels for a given set of screen polygons.
+
+ In common cases the drawPolyline overload can be used instead.
+ However in certain more complex cases this particular method
+ might be helpful for further optimization.
+*/
+
+ void drawLabelsForPolygons( const QVector<QPolygonF*> &polygons,
+ const QString& labelText,
+ LabelPositionFlags labelPositionFlags,
+ const QColor& labelColor );
+
+/*!
\brief Draws a given line string (a "polyline").
The \a lineString is drawn using the current pen.
@@ -329,7 +356,6 @@ class MARBLE_EXPORT GeoPainter : public ClipPainter
*/
void drawPolyline(const GeoDataLineString & lineString);
-
/*!
\brief Creates a region for a given line string (a "polyline").
diff --git a/src/lib/marble/geodata/graphicsitem/AbstractGeoPolygonGraphicsItem.cpp b/src/lib/marble/geodata/graphicsitem/AbstractGeoPolygonGraphicsItem.cpp
index 5f57312..7236dc5 100644
--- a/src/lib/marble/geodata/graphicsitem/AbstractGeoPolygonGraphicsItem.cpp
+++ b/src/lib/marble/geodata/graphicsitem/AbstractGeoPolygonGraphicsItem.cpp
@@ -75,24 +75,23 @@ QPen AbstractGeoPolygonGraphicsItem::configurePainter(GeoPainter *painter, const
GeoDataStyle::ConstPtr style = this->style();
if (!style) {
- painter->setPen( QPen() );
+ painter->setPen( QPen() ); // "style-less" polygons: a 1px black solid line
}
else {
const GeoDataPolyStyle& polyStyle = style->polyStyle();
- if (!polyStyle.outline()) {
- currentPen.setColor( Qt::transparent );
- }
- else {
+ if (polyStyle.outline()) { // polygons without outline: Qt::NoPen (not drawn)
const GeoDataLineStyle& lineStyle = style->lineStyle();
currentPen.setColor(lineStyle.paintedColor());
currentPen.setWidthF(lineStyle.width());
currentPen.setCapStyle(lineStyle.capStyle());
currentPen.setStyle(lineStyle.penStyle());
- }
- painter->setPen(currentPen);
+ if (painter->pen().color() != currentPen.color()) {
+ painter->setPen(currentPen);
+ }
+ }
if (!polyStyle.fill()) {
painter->setBrush(QColor(Qt::transparent));
diff --git a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
index 6768614..b1fc555 100644
--- a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
+++ b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
@@ -31,7 +31,8 @@ GeoLineStringGraphicsItem::GeoLineStringGraphicsItem(const GeoDataPlacemark *pla
const GeoDataLineString *lineString) :
GeoGraphicsItem(placemark),
m_lineString(lineString),
- m_renderLineString(lineString)
+ m_renderLineString(lineString),
+ m_renderLabel(false)
{
QString const category = StyleBuilder::visualCategoryName(placemark->visualCategory());
QStringList paintLayers;
@@ -118,23 +119,38 @@ const GeoDataLatLonAltBox& GeoLineStringGraphicsItem::latLonAltBox() const
void GeoLineStringGraphicsItem::paint(GeoPainter* painter, const ViewportParams* viewport , const QString &layer)
{
- int const tileLevel = qLn( viewport->radius() * 4 / 256 ) / qLn( 2.0 );
+ int const tileLevel = qLn( viewport->radius() / 64.0 ) / qLn( 2.0 );
setRenderContext(RenderContext(tileLevel));
if (layer.endsWith(QLatin1String("/outline"))) {
+ m_cachedPolygons.clear();
+ painter->polygonsFromLineString(*m_renderLineString, m_cachedPolygons);
+ if (m_cachedPolygons.empty()) return;
if (painter->mapQuality() == HighQuality || painter->mapQuality() == PrintQuality) {
- paintOutline(painter, viewport);
+ paintOutline(painter, viewport, m_cachedPolygons);
}
- } else if (layer.endsWith(QLatin1String("/label"))) {
- paintLabel(painter, viewport);
} else if (layer.endsWith(QLatin1String("/inline"))) {
- paintInline(painter, viewport);
+ if (m_cachedPolygons.empty()) return;
+ paintInline(painter, viewport, m_cachedPolygons);
+ } else if (layer.endsWith(QLatin1String("/label"))) {
+ if (!m_cachedPolygons.empty()) {
+ if (m_renderLabel) {
+ paintLabel(painter, viewport, m_cachedPolygons);
+ }
+ }
+ qDeleteAll(m_cachedPolygons);
} else {
- painter->drawPolyline(*m_renderLineString);
+ m_cachedPolygons.clear();
+ painter->polygonsFromLineString(*m_renderLineString, m_cachedPolygons);
+ if (m_cachedPolygons.empty()) return;
+ foreach(const QPolygonF* itPolygon, m_cachedPolygons) {
+ painter->drawPolyline(*itPolygon);
+ }
+ qDeleteAll(m_cachedPolygons);
}
}
-void GeoLineStringGraphicsItem::paintInline(GeoPainter* painter, const ViewportParams* viewport)
+void GeoLineStringGraphicsItem::paintInline(GeoPainter* painter, const ViewportParams* viewport, const QVector<QPolygonF*> &polygons)
{
if ( ( !viewport->resolves( m_renderLineString->latLonAltBox(), 2) ) ) {
return;
@@ -154,12 +170,14 @@ void GeoLineStringGraphicsItem::paintInline(GeoPainter* painter, const ViewportP
currentPen.setColor(style->polyStyle().paintedColor());
painter->setPen( currentPen );
}
- painter->drawPolyline(*m_renderLineString);
+ foreach(const QPolygonF* itPolygon, polygons) {
+ painter->drawPolyline(*itPolygon);
+ }
painter->restore();
}
-void GeoLineStringGraphicsItem::paintOutline(GeoPainter *painter, const ViewportParams *viewport)
+void GeoLineStringGraphicsItem::paintOutline(GeoPainter *painter, const ViewportParams *viewport, const QVector<QPolygonF*> &polygons)
{
if ( ( !viewport->resolves( m_renderLineString->latLonAltBox(), 2) ) ) {
return;
@@ -168,13 +186,17 @@ void GeoLineStringGraphicsItem::paintOutline(GeoPainter *painter, const Viewport
painter->save();
LabelPositionFlags labelPositionFlags = NoLabel;
QPen currentPen = configurePainter(painter, viewport, labelPositionFlags);
+ m_renderLabel = !( currentPen.widthF() < 8.0f );
+
if (!( currentPen.widthF() < 2.5f )) {
- painter->drawPolyline(*m_renderLineString);
+ foreach(const QPolygonF* itPolygon, polygons) {
+ painter->drawPolyline(*itPolygon);
+ }
}
painter->restore();
}
-void GeoLineStringGraphicsItem::paintLabel(GeoPainter *painter, const ViewportParams *viewport)
+void GeoLineStringGraphicsItem::paintLabel(GeoPainter *painter, const ViewportParams *viewport, const QVector<QPolygonF*> &polygons)
{
if ( ( !viewport->resolves( m_renderLineString->latLonAltBox(), 2) ) ) {
return;
@@ -184,23 +206,18 @@ void GeoLineStringGraphicsItem::paintLabel(GeoPainter *painter, const ViewportPa
LabelPositionFlags labelPositionFlags = NoLabel;
QPen currentPen = configurePainter(painter, viewport, labelPositionFlags);
- if (!( currentPen.widthF() < 2.5f )) {
- GeoDataStyle::ConstPtr style = this->style();
-
- QPen pen = QPen(QColor(Qt::transparent));
- pen.setWidthF(currentPen.widthF());
- painter->setPen(pen);
- // Activate the lines below to paint a label background which
- // prevents antialiasing overpainting glitches, but leads to
- // other glitches.
- //QColor const color = style->polyStyle().paintedColor();
- //painter->setBackground(QBrush(color));
- //painter->setBackgroundMode(Qt::OpaqueMode);
- const GeoDataLabelStyle& labelStyle = style->labelStyle();
- painter->setFont(labelStyle.font());
- painter->drawPolyline( *m_renderLineString, feature()->name(), FollowLine,
- labelStyle.paintedColor());
- }
+ GeoDataStyle::ConstPtr style = this->style();
+ const GeoDataLabelStyle& labelStyle = style->labelStyle();
+
+ // Activate the lines below to paint a label background which
+ // prevents antialiasing overpainting glitches, but leads to
+ // other glitches.
+ //QColor const color = style->polyStyle().paintedColor();
+ //painter->setBackground(QBrush(color));
+ //painter->setBackgroundMode(Qt::OpaqueMode);
+
+ painter->drawLabelsForPolygons(polygons, feature()->name(), FollowLine,
+ labelStyle.paintedColor());
painter->restore();
}
diff --git a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h
index 7217617..f1b74e3 100644
--- a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h
+++ b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h
@@ -37,15 +37,17 @@ public:
void paint(GeoPainter* painter, const ViewportParams *viewport, const QString &layer);
private:
- void paintOutline(GeoPainter *painter, const ViewportParams *viewport);
- void paintInline(GeoPainter *painter, const ViewportParams *viewport);
- void paintLabel(GeoPainter *painter, const ViewportParams *viewport);
+ void paintOutline(GeoPainter *painter, const ViewportParams *viewport, const QVector<QPolygonF*> &polygons);
+ void paintInline(GeoPainter *painter, const ViewportParams *viewport, const QVector<QPolygonF*> &polygons);
+ void paintLabel(GeoPainter *painter, const ViewportParams *viewport, const QVector<QPolygonF*> &polygons);
QPen configurePainter(GeoPainter* painter, const ViewportParams *viewport, LabelPositionFlags &labelPositionFlags) const;
static bool canMerge(const GeoDataCoordinates &a, const GeoDataCoordinates &b);
const GeoDataLineString *m_lineString;
const GeoDataLineString *m_renderLineString;
GeoDataLineString m_mergedLineString;
+ QVector<QPolygonF*> m_cachedPolygons;
+ bool m_renderLabel;
};
}