Skip to content

Commit

Permalink
Add missing dox to QgsRenderContext
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 21, 2019
1 parent e614942 commit f1384c2
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
55 changes: 55 additions & 0 deletions python/core/auto_generated/qgsrendercontext.sip.in
Expand Up @@ -203,6 +203,11 @@ render and represents the exact bounds of the map being rendered.
%End

const QgsMapToPixel &mapToPixel() const;
%Docstring
Returns the context's map to pixel transform, which transforms between map coordinates and device coordinates.

.. seealso:: :py:func:`setMapToPixel`
%End

double scaleFactor() const;
%Docstring
Expand All @@ -214,8 +219,20 @@ per millimeter.
%End

bool renderingStopped() const;
%Docstring
Returns ``True`` if the rendering operation has been stopped and any ongoing
rendering should be canceled immediately.

.. seealso:: :py:func:`setRenderingStopped`
%End

bool forceVectorOutput() const;
%Docstring
Returns ``True`` if rendering operations should use vector operations instead
of any faster raster shortcuts.

.. seealso:: :py:func:`setForceVectorOutput`
%End

bool useAdvancedEffects() const;
%Docstring
Expand All @@ -228,6 +245,11 @@ Used to enable or disable advanced effects such as blend modes
%End

bool drawEditingInformation() const;
%Docstring
Returns ``True`` if edit markers should be drawn during the render operation.

.. seealso:: :py:func:`setDrawEditingInformation`
%End

double rendererScale() const;
%Docstring
Expand All @@ -239,6 +261,11 @@ for the rendered map, eg 1000.0 for a 1:1000 map render.


QColor selectionColor() const;
%Docstring
Returns the color to use when rendering selected features.

.. seealso:: :py:func:`setSelectionColor`
%End

bool showSelection() const;
%Docstring
Expand Down Expand Up @@ -267,6 +294,11 @@ Set to an invalid QgsCoordinateTransform to indicate that no transformation is r
%End

void setMapToPixel( const QgsMapToPixel &mtp );
%Docstring
Sets the context's map to pixel transform, which transforms between map coordinates and device coordinates.

.. seealso:: :py:func:`mapToPixel`
%End

void setExtent( const QgsRectangle &extent );
%Docstring
Expand Down Expand Up @@ -298,8 +330,19 @@ render and represents the exact bounds of the map being rendered.
%End

void setDrawEditingInformation( bool b );
%Docstring
Sets whether edit markers should be drawn during the render operation.

.. seealso:: :py:func:`drawEditingInformation`
%End

void setRenderingStopped( bool stopped );
%Docstring
Sets whether the rendering operation has been ``stopped`` and any ongoing
rendering should be canceled immediately.

.. seealso:: :py:func:`renderingStopped`
%End

void setDistanceArea( const QgsDistanceArea &distanceArea );
%Docstring
Expand Down Expand Up @@ -336,8 +379,20 @@ of any rendering operations.
%End

void setForceVectorOutput( bool force );
%Docstring
Sets whether rendering operations should use vector operations instead
of any faster raster shortcuts.

.. seealso:: :py:func:`forceVectorOutput`
%End


void setSelectionColor( const QColor &color );
%Docstring
Sets the ``color`` to use when rendering selected features.

.. seealso:: :py:func:`selectionColor`
%End

void setShowSelection( bool showSelection );
%Docstring
Expand Down
55 changes: 55 additions & 0 deletions src/core/qgsrendercontext.h
Expand Up @@ -250,6 +250,11 @@ class CORE_EXPORT QgsRenderContext
*/
QgsRectangle mapExtent() const { return mOriginalMapExtent; }

/**
* Returns the context's map to pixel transform, which transforms between map coordinates and device coordinates.
*
* \see setMapToPixel()
*/
const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}

/**
Expand All @@ -260,8 +265,20 @@ class CORE_EXPORT QgsRenderContext
*/
double scaleFactor() const {return mScaleFactor;}

/**
* Returns TRUE if the rendering operation has been stopped and any ongoing
* rendering should be canceled immediately.
*
* \see setRenderingStopped()
*/
bool renderingStopped() const {return mRenderingStopped;}

/**
* Returns TRUE if rendering operations should use vector operations instead
* of any faster raster shortcuts.
*
* \see setForceVectorOutput()
*/
bool forceVectorOutput() const;

/**
Expand All @@ -274,6 +291,11 @@ class CORE_EXPORT QgsRenderContext
*/
void setUseAdvancedEffects( bool enabled );

/**
* Returns TRUE if edit markers should be drawn during the render operation.
*
* \see setDrawEditingInformation()
*/
bool drawEditingInformation() const;

/**
Expand All @@ -289,6 +311,11 @@ class CORE_EXPORT QgsRenderContext
*/
QgsLabelingEngine *labelingEngine() const { return mLabelingEngine; } SIP_SKIP

/**
* Returns the color to use when rendering selected features.
*
* \see setSelectionColor()
*/
QColor selectionColor() const { return mSelectionColor; }

/**
Expand All @@ -314,6 +341,11 @@ class CORE_EXPORT QgsRenderContext
*/
void setCoordinateTransform( const QgsCoordinateTransform &t );

/**
* Sets the context's map to pixel transform, which transforms between map coordinates and device coordinates.
*
* \see mapToPixel()
*/
void setMapToPixel( const QgsMapToPixel &mtp ) {mMapToPixel = mtp;}

/**
Expand Down Expand Up @@ -342,8 +374,19 @@ class CORE_EXPORT QgsRenderContext
*/
void setMapExtent( const QgsRectangle &extent ) { mOriginalMapExtent = extent; }

/**
* Sets whether edit markers should be drawn during the render operation.
*
* \see drawEditingInformation()
*/
void setDrawEditingInformation( bool b );

/**
* Sets whether the rendering operation has been \a stopped and any ongoing
* rendering should be canceled immediately.
*
* \see renderingStopped()
*/
void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}

/**
Expand Down Expand Up @@ -376,13 +419,25 @@ class CORE_EXPORT QgsRenderContext
*/
void setPainter( QPainter *p ) {mPainter = p;}

/**
* Sets whether rendering operations should use vector operations instead
* of any faster raster shortcuts.
*
* \see forceVectorOutput()
*/
void setForceVectorOutput( bool force );

/**
* Assign new labeling engine
* \note not available in Python bindings
*/
void setLabelingEngine( QgsLabelingEngine *engine2 ) { mLabelingEngine = engine2; } SIP_SKIP

/**
* Sets the \a color to use when rendering selected features.
*
* \see selectionColor()
*/
void setSelectionColor( const QColor &color ) { mSelectionColor = color; }

/**
Expand Down

0 comments on commit f1384c2

Please sign in to comment.