Add const version of QgsRenderContext::painter

This commit is contained in:
Sandro Mani 2020-01-15 23:52:14 +01:00 committed by Nyall Dawson
parent 062600f101
commit 60b4cad050
2 changed files with 11 additions and 0 deletions

View File

@ -109,6 +109,7 @@ Returns the destination QPainter for the render operation.
.. seealso:: :py:func:`setPainter`
%End
QPainter *maskPainter( int id = 0 );
%Docstring
Returns a mask QPainter for the render operation.

View File

@ -170,6 +170,16 @@ class CORE_EXPORT QgsRenderContext
*/
QPainter *painter() {return mPainter;}
#ifndef SIP_RUN
/**
* Returns the const destination QPainter for the render operation.
* \see setPainter()
* \since QGIS 3.12
*/
const QPainter *painter() const { return mPainter; }
#endif
/**
* Returns a mask QPainter for the render operation.
* Multiple mask painters can be defined, each with a unique identifier.