@@ -302,6 +302,7 @@ void QgsImageFillSymbolLayer::renderPolygon( const QPolygonF& points, QList<QPol
302
302
return ;
303
303
}
304
304
305
+ mNextAngle = mAngle ;
305
306
applyDataDefinedSettings ( context );
306
307
307
308
p->setPen ( QPen ( Qt::NoPen ) );
@@ -315,14 +316,14 @@ void QgsImageFillSymbolLayer::renderPolygon( const QPolygonF& points, QList<QPol
315
316
_renderPolygon ( p, points, rings );
316
317
}
317
318
318
- if ( qgsDoubleNear ( mAngle , 0.0 ) )
319
+ if ( qgsDoubleNear ( mNextAngle , 0.0 ) )
319
320
{
320
321
p->setBrush ( mBrush );
321
322
}
322
323
else
323
324
{
324
325
QTransform t = mBrush .transform ();
325
- t.rotate ( mAngle );
326
+ t.rotate ( mNextAngle );
326
327
QBrush rotatedBrush = mBrush ;
327
328
rotatedBrush.setTransform ( t );
328
329
p->setBrush ( rotatedBrush );
@@ -766,11 +767,17 @@ void QgsSVGFillSymbolLayer::applyDataDefinedSettings( const QgsSymbolV2RenderCon
766
767
QgsExpression* fillColorExpression = expression ( " svgFillColor" );
767
768
QgsExpression* outlineColorExpression = expression ( " svgOutlineColor" );
768
769
QgsExpression* outlineWidthExpression = expression ( " svgOutlineWidth" );
769
- if ( !widthExpression && !svgFileExpression && !fillColorExpression && !outlineColorExpression && !outlineWidthExpression )
770
+ QgsExpression* angleExpression = expression ( " angle" );
771
+ if ( !widthExpression && !svgFileExpression && !fillColorExpression && !outlineColorExpression && !outlineWidthExpression && !angleExpression )
770
772
{
771
773
return ; // no data defined settings
772
774
}
773
775
776
+ if ( angleExpression )
777
+ {
778
+ mNextAngle = angleExpression->evaluate ( const_cast <QgsFeature*>( context.feature () ) ).toDouble ();
779
+ }
780
+
774
781
double width = mPatternWidth ;
775
782
if ( widthExpression )
776
783
{
0 commit comments