Skip to content

Commit

Permalink
Add const version of QgsRenderContext::painter
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro authored and nyalldawson committed Jan 16, 2020
1 parent 062600f commit 60b4cad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsrendercontext.sip.in
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions src/core/qgsrendercontext.h
Expand Up @@ -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.
Expand Down

0 comments on commit 60b4cad

Please sign in to comment.