@@ -207,13 +207,13 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
207207 bool ok;
208208 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH ) )
209209 {
210- double width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context. feature () , mOutlineWidth ).toDouble ();
210+ double width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble ();
211211 width *= QgsSymbolLayerV2Utils::lineWidthScaleFactor ( context.renderContext (), mOutlineWidthUnit , mOutlineWidthMapUnitScale );
212212 mPen .setWidthF ( width );
213213 }
214214 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_STYLE ) )
215215 {
216- QString styleString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_STYLE, context. feature () , QVariant (), &ok ).toString ();
216+ QString styleString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_STYLE, context, QVariant (), &ok ).toString ();
217217 if ( ok )
218218 {
219219 Qt::PenStyle style = QgsSymbolLayerV2Utils::decodePenStyle ( styleString );
@@ -222,13 +222,13 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
222222 }
223223 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR ) )
224224 {
225- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, context. feature () , QVariant (), &ok ).toString ();
225+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, context, QVariant (), &ok ).toString ();
226226 if ( ok )
227227 mBrush .setColor ( QColor ( QgsSymbolLayerV2Utils::decodeColor ( colorString ) ) );
228228 }
229229 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR ) )
230230 {
231- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, context. feature () , QVariant (), &ok ).toString ();
231+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, context, QVariant (), &ok ).toString ();
232232 if ( ok )
233233 mPen .setColor ( QColor ( QgsSymbolLayerV2Utils::decodeColor ( colorString ) ) );
234234 }
@@ -239,7 +239,7 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
239239 QString symbolName = mSymbolName ;
240240 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME ) )
241241 {
242- symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, context. feature () , mSymbolName ).toString ();
242+ symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, context, mSymbolName ).toString ();
243243 }
244244 preparePath ( symbolName, context, &scaledWidth, &scaledHeight, context.feature () );
245245 }
@@ -260,7 +260,7 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
260260 double rotation = 0.0 ;
261261 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION ) )
262262 {
263- rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, context. feature () , mAngle ).toDouble () + mLineAngle ;
263+ rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, context, mAngle ).toDouble () + mLineAngle ;
264264 }
265265 else if ( !qgsDoubleNear ( mAngle + mLineAngle , 0.0 ) )
266266 {
@@ -297,7 +297,7 @@ void QgsEllipseSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context )
297297 mPen .setStyle ( mOutlineStyle );
298298 mPen .setWidthF ( mOutlineWidth * QgsSymbolLayerV2Utils::lineWidthScaleFactor ( context.renderContext (), mOutlineWidthUnit , mOutlineWidthMapUnitScale ) );
299299 mBrush .setColor ( mFillColor );
300- prepareExpressions ( context. fields (), context. renderContext (). rendererScale () );
300+ prepareExpressions ( context );
301301}
302302
303303void QgsEllipseSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext & )
@@ -453,7 +453,7 @@ QgsStringMap QgsEllipseSymbolLayerV2::properties() const
453453 return map;
454454}
455455
456- void QgsEllipseSymbolLayerV2::preparePath ( const QString& symbolName, QgsSymbolV2RenderContext& context, double * scaledWidth, double * scaledHeight, const QgsFeature* f )
456+ void QgsEllipseSymbolLayerV2::preparePath ( const QString& symbolName, QgsSymbolV2RenderContext& context, double * scaledWidth, double * scaledHeight, const QgsFeature* )
457457{
458458 mPainterPath = QPainterPath ();
459459 const QgsRenderContext& ct = context.renderContext ();
@@ -462,7 +462,7 @@ void QgsEllipseSymbolLayerV2::preparePath( const QString& symbolName, QgsSymbolV
462462
463463 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH ) ) // 1. priority: data defined setting on symbol layer le
464464 {
465- width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, f , mSymbolWidth ).toDouble ();
465+ width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, context , mSymbolWidth ).toDouble ();
466466 }
467467 else if ( context.renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
468468 {
@@ -481,7 +481,7 @@ void QgsEllipseSymbolLayerV2::preparePath( const QString& symbolName, QgsSymbolV
481481 double height = 0 ;
482482 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT ) ) // 1. priority: data defined setting on symbol layer level
483483 {
484- height = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, f , mSymbolHeight ).toDouble ();
484+ height = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, context , mSymbolHeight ).toDouble ();
485485 }
486486 else if ( context.renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
487487 {
@@ -558,14 +558,14 @@ QgsMapUnitScale QgsEllipseSymbolLayerV2::mapUnitScale() const
558558 return QgsMapUnitScale ();
559559}
560560
561- bool QgsEllipseSymbolLayerV2::writeDxf ( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f , const QPointF& shift ) const
561+ bool QgsEllipseSymbolLayerV2::writeDxf ( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature*, const QPointF& shift ) const
562562{
563563 // width
564564 double symbolWidth = mSymbolWidth ;
565565
566566 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH ) ) // 1. priority: data defined setting on symbol layer le
567567 {
568- symbolWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, f , mSymbolWidth ).toDouble ();
568+ symbolWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, *context , mSymbolWidth ).toDouble ();
569569 }
570570 else if ( context->renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
571571 {
@@ -580,7 +580,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
580580 double symbolHeight = mSymbolHeight ;
581581 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT ) ) // 1. priority: data defined setting on symbol layer level
582582 {
583- symbolHeight = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, f , mSymbolHeight ).toDouble ();
583+ symbolHeight = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, *context , mSymbolHeight ).toDouble ();
584584 }
585585 else if ( context->renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
586586 {
@@ -596,7 +596,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
596596
597597 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH ) )
598598 {
599- outlineWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, f , mOutlineWidth ).toDouble ();
599+ outlineWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, *context , mOutlineWidth ).toDouble ();
600600 }
601601 if ( mOutlineWidthUnit == QgsSymbolV2::MM )
602602 {
@@ -608,7 +608,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
608608 QColor fc = mFillColor ;
609609 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR ) )
610610 {
611- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, f , QVariant (), &ok ).toString ();
611+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, *context , QVariant (), &ok ).toString ();
612612 if ( ok )
613613 fc = QColor ( colorString );
614614 }
@@ -617,7 +617,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
617617 QColor oc = mOutlineColor ;
618618 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR ) )
619619 {
620- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, f , QVariant (), &ok ).toString ();
620+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, *context , QVariant (), &ok ).toString ();
621621 if ( ok )
622622 oc = QColor ( colorString );
623623 }
@@ -626,7 +626,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
626626 QString symbolName = mSymbolName ;
627627 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME ) )
628628 {
629- symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, f , mSymbolName ).toString ();
629+ symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, *context , mSymbolName ).toString ();
630630 }
631631
632632 // offset
@@ -639,7 +639,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
639639 double rotation = 0.0 ;
640640 if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION ) )
641641 {
642- rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, f , mAngle ).toDouble () + mLineAngle ;
642+ rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, *context , mAngle ).toDouble () + mLineAngle ;
643643 }
644644 else if ( !qgsDoubleNear ( mAngle + mLineAngle , 0.0 ) )
645645 {
0 commit comments