Skip to content
Permalink
Browse files

prepare expressions of properties for SVG parameters

  • Loading branch information
3nids committed Jan 6, 2021
1 parent 3881c81 commit 130cbae947698c18e410b67309504a748291f0ac
@@ -705,6 +705,9 @@ Returns the units for the stroke width.
virtual QRectF bounds( QPointF point, QgsSymbolRenderContext &context );


virtual void prepareExpressions( const QgsSymbolRenderContext &context );


protected:

double calculateAspectRatio( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedAspectRatio ) const;
@@ -3539,3 +3539,12 @@ QgsSymbolLayer *QgsFontMarkerSymbolLayer::createFromSld( QDomElement &element )
return m;
}


void QgsSvgMarkerSymbolLayer::prepareExpressions( const QgsSymbolRenderContext &context )
{
QMap<QString, QgsProperty>::iterator it = mParameters.begin();
for ( ; it != mParameters.end(); ++it )
it.value().prepare( context.renderContext().expressionContext() );

QgsMarkerSymbolLayer::prepareExpressions( context );
}
@@ -627,6 +627,8 @@ class CORE_EXPORT QgsSvgMarkerSymbolLayer : public QgsMarkerSymbolLayer

QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;

void prepareExpressions( const QgsSymbolRenderContext &context ) override;

protected:

/**

0 comments on commit 130cbae

Please sign in to comment.
You can’t perform that action at this time.