Skip to content
Permalink
Browse files
Fix geometry generator used in subsymbol of point pattern fill results
in only a single marker being rendered
  • Loading branch information
nyalldawson committed Oct 25, 2021
1 parent 3429203 commit 0785488631643331e5a10e8c1f8debc5cbbdc90a
Showing with 20 additions and 0 deletions.
  1. +4 −0 python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in
  2. +14 −0 src/core/symbology/qgsfillsymbollayer.cpp
  3. +2 −0 src/core/symbology/qgsfillsymbollayer.h
@@ -1802,6 +1802,10 @@ Caller takes ownership of the returned symbol layer.

virtual void stopRender( QgsSymbolRenderContext &context );

virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );

virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );

virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );

virtual QVariantMap properties() const;
@@ -3583,6 +3583,20 @@ void QgsPointPatternFillSymbolLayer::stopRender( QgsSymbolRenderContext &context
}
}

void QgsPointPatternFillSymbolLayer::startFeatureRender( const QgsFeature &, QgsRenderContext & )
{
// The base class version passes this on to the subsymbol, but we deliberately don't do that here.
// Otherwise generators used in the subsymbol will only render a single point per feature (they
// have logic to only render once per paired call to startFeatureRender/stopFeatureRender).
}

void QgsPointPatternFillSymbolLayer::stopFeatureRender( const QgsFeature &, QgsRenderContext & )
{
// The base class version passes this on to the subsymbol, but we deliberately don't do that here.
// Otherwise generators used in the subsymbol will only render a single point per feature (they
// have logic to only render once per paired call to startFeatureRender/stopFeatureRender).
}

void QgsPointPatternFillSymbolLayer::renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context )
{
if ( !mRenderUsingMarkers )
@@ -1657,6 +1657,8 @@ class CORE_EXPORT QgsPointPatternFillSymbolLayer: public QgsImageFillSymbolLayer
QString layerType() const override;
void startRender( QgsSymbolRenderContext &context ) override;
void stopRender( QgsSymbolRenderContext &context ) override;
void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
QVariantMap properties() const override;
QgsPointPatternFillSymbolLayer *clone() const override SIP_FACTORY;

0 comments on commit 0785488

Please sign in to comment.