Skip to content
Permalink
Browse files

QgsSymbol::start/stopFeatureRender needs to be public so python subcl…

…asses can call it
  • Loading branch information
nyalldawson committed Mar 31, 2021
1 parent f6b4717 commit ce5558ee05a27057feb619718dc23b02daa43a47
Showing with 52 additions and 28 deletions.
  1. +26 −0 python/core/auto_generated/symbology/qgssymbol.sip.in
  2. +26 −28 src/core/symbology/qgssymbol.h
@@ -612,6 +612,32 @@ the rendering process. After rendering all features :py:func:`~QgsSymbol.stopRen
Returns the symbol render context. Only valid between startRender and stopRender calls.

:return: The symbol render context
%End

void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );
%Docstring
Called before symbol layers will be rendered for a particular ``feature``.

This is always followed by a call to :py:func:`~QgsSymbol.stopFeatureRender` after the feature
has been completely rendered (i.e. all parts have been rendered).

Internally, this notifies all symbol layers which will be used via a call to
:py:func:`QgsSymbolLayer.startFeatureRender()`.

.. versionadded:: 3.20
%End

void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );
%Docstring
Called after symbol layers have been rendered for a particular ``feature``.

This is always preceded by a call to :py:func:`~QgsSymbol.startFeatureRender` just before the feature
will be rendered.

Internally, this notifies all symbol layers which were used via a call to
:py:func:`QgsSymbolLayer.stopFeatureRender()`.

.. versionadded:: 3.20
%End

protected:
@@ -638,6 +638,32 @@ class CORE_EXPORT QgsSymbol
*/
QgsSymbolRenderContext *symbolRenderContext();

/**
* Called before symbol layers will be rendered for a particular \a feature.
*
* This is always followed by a call to stopFeatureRender() after the feature
* has been completely rendered (i.e. all parts have been rendered).
*
* Internally, this notifies all symbol layers which will be used via a call to
* QgsSymbolLayer::startFeatureRender().
*
* \since QGIS 3.20
*/
void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

/**
* Called after symbol layers have been rendered for a particular \a feature.
*
* This is always preceded by a call to startFeatureRender() just before the feature
* will be rendered.
*
* Internally, this notifies all symbol layers which were used via a call to
* QgsSymbolLayer::stopFeatureRender().
*
* \since QGIS 3.20
*/
void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

protected:
QgsSymbol( SymbolType type, const QgsSymbolLayerList &layers SIP_TRANSFER ); // can't be instantiated

@@ -741,34 +767,6 @@ class CORE_EXPORT QgsSymbol

QgsPropertyCollection mDataDefinedProperties;

/**
* Called before symbol layers will be rendered for a particular \a feature.
*
* This is always followed by a call to stopFeatureRender() after the feature
* has been completely rendered (i.e. all parts have been rendered).
*
* Internally, this notifies all symbol layers which will be used via a call to
* QgsSymbolLayer::startFeatureRender().
*
* \since QGIS 3.12
*/
void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

/**
* Called after symbol layers have been rendered for a particular \a feature.
*
* This is always preceded by a call to startFeatureRender() just before the feature
* will be rendered.
*
* Internally, this notifies all symbol layers which were used via a call to
* QgsSymbolLayer::stopFeatureRender().
*
* \since QGIS 3.12
*/
void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

friend class QgsSymbolLayer;

Q_DISABLE_COPY( QgsSymbol )

};

0 comments on commit ce5558e

Please sign in to comment.