@@ -207,13 +207,13 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
207
207
bool ok;
208
208
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH ) )
209
209
{
210
- double width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context. feature () , mOutlineWidth ).toDouble ();
210
+ double width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble ();
211
211
width *= QgsSymbolLayerV2Utils::lineWidthScaleFactor ( context.renderContext (), mOutlineWidthUnit , mOutlineWidthMapUnitScale );
212
212
mPen .setWidthF ( width );
213
213
}
214
214
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_STYLE ) )
215
215
{
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 ();
217
217
if ( ok )
218
218
{
219
219
Qt::PenStyle style = QgsSymbolLayerV2Utils::decodePenStyle ( styleString );
@@ -222,13 +222,13 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
222
222
}
223
223
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR ) )
224
224
{
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 ();
226
226
if ( ok )
227
227
mBrush .setColor ( QColor ( QgsSymbolLayerV2Utils::decodeColor ( colorString ) ) );
228
228
}
229
229
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR ) )
230
230
{
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 ();
232
232
if ( ok )
233
233
mPen .setColor ( QColor ( QgsSymbolLayerV2Utils::decodeColor ( colorString ) ) );
234
234
}
@@ -239,7 +239,7 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
239
239
QString symbolName = mSymbolName ;
240
240
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME ) )
241
241
{
242
- symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, context. feature () , mSymbolName ).toString ();
242
+ symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, context, mSymbolName ).toString ();
243
243
}
244
244
preparePath ( symbolName, context, &scaledWidth, &scaledHeight, context.feature () );
245
245
}
@@ -260,7 +260,7 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
260
260
double rotation = 0.0 ;
261
261
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION ) )
262
262
{
263
- rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, context. feature () , mAngle ).toDouble () + mLineAngle ;
263
+ rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, context, mAngle ).toDouble () + mLineAngle ;
264
264
}
265
265
else if ( !qgsDoubleNear ( mAngle + mLineAngle , 0.0 ) )
266
266
{
@@ -297,7 +297,7 @@ void QgsEllipseSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context )
297
297
mPen .setStyle ( mOutlineStyle );
298
298
mPen .setWidthF ( mOutlineWidth * QgsSymbolLayerV2Utils::lineWidthScaleFactor ( context.renderContext (), mOutlineWidthUnit , mOutlineWidthMapUnitScale ) );
299
299
mBrush .setColor ( mFillColor );
300
- prepareExpressions ( context. fields (), context. renderContext (). rendererScale () );
300
+ prepareExpressions ( context );
301
301
}
302
302
303
303
void QgsEllipseSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext & )
@@ -453,7 +453,7 @@ QgsStringMap QgsEllipseSymbolLayerV2::properties() const
453
453
return map;
454
454
}
455
455
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* )
457
457
{
458
458
mPainterPath = QPainterPath ();
459
459
const QgsRenderContext& ct = context.renderContext ();
@@ -462,7 +462,7 @@ void QgsEllipseSymbolLayerV2::preparePath( const QString& symbolName, QgsSymbolV
462
462
463
463
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH ) ) // 1. priority: data defined setting on symbol layer le
464
464
{
465
- width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, f , mSymbolWidth ).toDouble ();
465
+ width = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, context , mSymbolWidth ).toDouble ();
466
466
}
467
467
else if ( context.renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
468
468
{
@@ -481,7 +481,7 @@ void QgsEllipseSymbolLayerV2::preparePath( const QString& symbolName, QgsSymbolV
481
481
double height = 0 ;
482
482
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT ) ) // 1. priority: data defined setting on symbol layer level
483
483
{
484
- height = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, f , mSymbolHeight ).toDouble ();
484
+ height = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, context , mSymbolHeight ).toDouble ();
485
485
}
486
486
else if ( context.renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
487
487
{
@@ -558,14 +558,14 @@ QgsMapUnitScale QgsEllipseSymbolLayerV2::mapUnitScale() const
558
558
return QgsMapUnitScale ();
559
559
}
560
560
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
562
562
{
563
563
// width
564
564
double symbolWidth = mSymbolWidth ;
565
565
566
566
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH ) ) // 1. priority: data defined setting on symbol layer le
567
567
{
568
- symbolWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, f , mSymbolWidth ).toDouble ();
568
+ symbolWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_WIDTH, *context , mSymbolWidth ).toDouble ();
569
569
}
570
570
else if ( context->renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
571
571
{
@@ -580,7 +580,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
580
580
double symbolHeight = mSymbolHeight ;
581
581
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT ) ) // 1. priority: data defined setting on symbol layer level
582
582
{
583
- symbolHeight = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, f , mSymbolHeight ).toDouble ();
583
+ symbolHeight = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_HEIGHT, *context , mSymbolHeight ).toDouble ();
584
584
}
585
585
else if ( context->renderHints () & QgsSymbolV2::DataDefinedSizeScale ) // 2. priority: is data defined size on symbol level
586
586
{
@@ -596,7 +596,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
596
596
597
597
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH ) )
598
598
{
599
- outlineWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, f , mOutlineWidth ).toDouble ();
599
+ outlineWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, *context , mOutlineWidth ).toDouble ();
600
600
}
601
601
if ( mOutlineWidthUnit == QgsSymbolV2::MM )
602
602
{
@@ -608,7 +608,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
608
608
QColor fc = mFillColor ;
609
609
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR ) )
610
610
{
611
- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, f , QVariant (), &ok ).toString ();
611
+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL_COLOR, *context , QVariant (), &ok ).toString ();
612
612
if ( ok )
613
613
fc = QColor ( colorString );
614
614
}
@@ -617,7 +617,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
617
617
QColor oc = mOutlineColor ;
618
618
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR ) )
619
619
{
620
- QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, f , QVariant (), &ok ).toString ();
620
+ QString colorString = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_COLOR, *context , QVariant (), &ok ).toString ();
621
621
if ( ok )
622
622
oc = QColor ( colorString );
623
623
}
@@ -626,7 +626,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
626
626
QString symbolName = mSymbolName ;
627
627
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME ) )
628
628
{
629
- symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, f , mSymbolName ).toString ();
629
+ symbolName = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_SYMBOL_NAME, *context , mSymbolName ).toString ();
630
630
}
631
631
632
632
// offset
@@ -639,7 +639,7 @@ bool QgsEllipseSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa
639
639
double rotation = 0.0 ;
640
640
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION ) )
641
641
{
642
- rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, f , mAngle ).toDouble () + mLineAngle ;
642
+ rotation = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_ROTATION, *context , mAngle ).toDouble () + mLineAngle ;
643
643
}
644
644
else if ( !qgsDoubleNear ( mAngle + mLineAngle , 0.0 ) )
645
645
{
0 commit comments