Skip to content

Commit

Permalink
Consider also original marker rotation in marker line with rotated sy…
Browse files Browse the repository at this point in the history
…mbols.

git-svn-id: http://svn.osgeo.org/qgis/trunk@12720 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jan 9, 2010
1 parent 6d7b7b9 commit 74a4be8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/symbology-ng/qgslinesymbollayerv2.cpp
Expand Up @@ -231,6 +231,7 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineNoOffset( const QPolygonF& points
QPointF lastPt = points[0];
double lengthLeft = 0; // how much is left until next marker
bool first = true;
double origAngle = mMarker->angle();

for ( int i = 1; i < points.count(); ++i )
{
Expand All @@ -252,7 +253,7 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineNoOffset( const QPolygonF& points
// rotate marker (if desired)
if ( mRotateMarker )
{
mMarker->setAngle( l.angle() * 180 / M_PI );
mMarker->setAngle( origAngle + ( l.angle() * 180 / M_PI ) );
mMarker->startRender( context );
}

Expand All @@ -279,6 +280,9 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineNoOffset( const QPolygonF& points
mMarker->stopRender( context );
}

// restore original rotation
mMarker->setAngle( origAngle );

}

QgsStringMap QgsMarkerLineSymbolLayerV2::properties() const
Expand Down

0 comments on commit 74a4be8

Please sign in to comment.