Skip to content

Commit

Permalink
Fix #10819 (simple/marker line with offset on the wrong side of inner…
Browse files Browse the repository at this point in the history
… rings)
  • Loading branch information
wonder-sk committed Oct 20, 2014
1 parent 43c4cd7 commit 4906d56
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/core/symbology-ng/qgslinesymbollayerv2.sip
Expand Up @@ -125,6 +125,8 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2

void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context );

void renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );

QgsStringMap properties() const;

QgsSymbolLayerV2* clone() const;
Expand Down
14 changes: 14 additions & 0 deletions src/core/symbology-ng/qgslinesymbollayerv2.cpp
Expand Up @@ -274,8 +274,10 @@ void QgsSimpleLineSymbolLayerV2::renderPolygonOutline( const QPolygonF& points,
renderPolyline( points, context );
if ( rings )
{
mOffset = -mOffset; // invert the offset for rings!
foreach ( const QPolygonF& ring, *rings )
renderPolyline( ring, context );
mOffset = -mOffset;
}

if ( mDrawInsidePolygon )
Expand Down Expand Up @@ -848,6 +850,18 @@ void QgsMarkerLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
}
}

void QgsMarkerLineSymbolLayerV2::renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context )
{
renderPolyline( points, context );
if ( rings )
{
mOffset = -mOffset; // invert the offset for rings!
foreach ( const QPolygonF& ring, *rings )
renderPolyline( ring, context );
mOffset = -mOffset;
}
}

void QgsMarkerLineSymbolLayerV2::renderPolylineInterval( const QPolygonF& points, QgsSymbolV2RenderContext& context )
{
if ( points.isEmpty() )
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgslinesymbollayerv2.h
Expand Up @@ -176,6 +176,8 @@ class CORE_EXPORT QgsMarkerLineSymbolLayerV2 : public QgsLineSymbolLayerV2

void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context );

void renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );

QgsStringMap properties() const;

QgsSymbolLayerV2* clone() const;
Expand Down

0 comments on commit 4906d56

Please sign in to comment.