@@ -723,7 +723,7 @@ void QgsGradientFillSymbolLayerV2::startRender( QgsSymbolV2RenderContext& contex
723
723
mSelBrush = QBrush ( selColor );
724
724
725
725
// update mBrush to use a gradient fill with specified properties
726
- prepareExpressions ( context.fields () );
726
+ prepareExpressions ( context.fields (), context. renderContext (). rendererScale () );
727
727
}
728
728
729
729
void QgsGradientFillSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext& context )
@@ -999,7 +999,7 @@ void QgsShapeburstFillSymbolLayerV2::startRender( QgsSymbolV2RenderContext& cont
999
999
if ( ! selectionIsOpaque ) selColor.setAlphaF ( context.alpha () );
1000
1000
mSelBrush = QBrush ( selColor );
1001
1001
1002
- prepareExpressions ( context.fields () );
1002
+ prepareExpressions ( context.fields (), context. renderContext (). rendererScale () );
1003
1003
}
1004
1004
1005
1005
void QgsShapeburstFillSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext& context )
@@ -1799,7 +1799,7 @@ void QgsSVGFillSymbolLayer::startRender( QgsSymbolV2RenderContext& context )
1799
1799
1800
1800
if ( mOutline )
1801
1801
{
1802
- mOutline ->startRender ( context.renderContext () );
1802
+ mOutline ->startRender ( context.renderContext (), context. fields () );
1803
1803
}
1804
1804
1805
1805
prepareExpressions ( context.fields (), context.renderContext ().rendererScale () );
@@ -2531,7 +2531,7 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolV2RenderContext
2531
2531
lineRenderContext.setMapToPixel ( mtp );
2532
2532
lineRenderContext.setForceVectorOutput ( false );
2533
2533
2534
- fillLineSymbol->startRender ( lineRenderContext );
2534
+ fillLineSymbol->startRender ( lineRenderContext, context. fields () );
2535
2535
2536
2536
QVector<QPolygonF> polygons;
2537
2537
polygons.append ( QPolygonF () << p1 << p2 );
@@ -2577,7 +2577,7 @@ void QgsLinePatternFillSymbolLayer::startRender( QgsSymbolV2RenderContext& conte
2577
2577
2578
2578
if ( mFillLineSymbol )
2579
2579
{
2580
- mFillLineSymbol ->startRender ( context.renderContext () );
2580
+ mFillLineSymbol ->startRender ( context.renderContext (), context. fields () );
2581
2581
}
2582
2582
2583
2583
prepareExpressions ( context.fields (), context.renderContext ().rendererScale () );
@@ -2947,14 +2947,15 @@ void QgsPointPatternFillSymbolLayer::applyPattern( const QgsSymbolV2RenderContex
2947
2947
2948
2948
// marker rendering needs context for drawing on patternImage
2949
2949
QgsRenderContext pointRenderContext;
2950
+ pointRenderContext.setRendererScale ( context.renderContext ().rendererScale () );
2950
2951
pointRenderContext.setPainter ( &p );
2951
2952
pointRenderContext.setRasterScaleFactor ( 1.0 );
2952
2953
pointRenderContext.setScaleFactor ( context.renderContext ().scaleFactor () * context.renderContext ().rasterScaleFactor () );
2953
2954
QgsMapToPixel mtp ( context.renderContext ().mapToPixel ().mapUnitsPerPixel () / context.renderContext ().rasterScaleFactor () );
2954
2955
pointRenderContext.setMapToPixel ( mtp );
2955
2956
pointRenderContext.setForceVectorOutput ( false );
2956
2957
2957
- mMarkerSymbol ->startRender ( pointRenderContext );
2958
+ mMarkerSymbol ->startRender ( pointRenderContext, context. fields () );
2958
2959
2959
2960
// render corner points
2960
2961
mMarkerSymbol ->renderPoint ( QPointF ( 0 , 0 ), context.feature (), pointRenderContext );
@@ -2995,7 +2996,7 @@ void QgsPointPatternFillSymbolLayer::startRender( QgsSymbolV2RenderContext& cont
2995
2996
2996
2997
if ( mOutline )
2997
2998
{
2998
- mOutline ->startRender ( context.renderContext () );
2999
+ mOutline ->startRender ( context.renderContext (), context. fields () );
2999
3000
}
3000
3001
prepareExpressions ( context.fields (), context.renderContext ().rendererScale () );
3001
3002
}
@@ -3188,7 +3189,7 @@ void QgsCentroidFillSymbolLayerV2::setColor( const QColor& color )
3188
3189
void QgsCentroidFillSymbolLayerV2::startRender ( QgsSymbolV2RenderContext& context )
3189
3190
{
3190
3191
mMarker ->setAlpha ( context.alpha () );
3191
- mMarker ->startRender ( context.renderContext () );
3192
+ mMarker ->startRender ( context.renderContext (), context. fields () );
3192
3193
}
3193
3194
3194
3195
void QgsCentroidFillSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext& context )
0 commit comments