QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
QgsRenderContext Class Reference

Contains information about the context of a rendering operation. More...

#include <qgsrendercontext.h>

Public Member Functions

 QgsRenderContext ()
 ~QgsRenderContext ()
QPainter * painter ()
const QPainter * constPainter () const
const QgsCoordinateTransformcoordinateTransform () const
const QgsRectangleextent () const
const QgsMapToPixelmapToPixel () const
double scaleFactor () const
double rasterScaleFactor () const
bool renderingStopped () const
bool forceVectorOutput () const
bool useAdvancedEffects () const
 Returns true if advanced effects such as blend modes such be used.
void setUseAdvancedEffects (bool enabled)
 Used to enable or disable advanced effects such as blend modes.
bool drawEditingInformation () const
double rendererScale () const
QgsLabelingEngineInterfacelabelingEngine () const
QColor selectionColor () const
bool showSelection () const
 Returns true if vector selections should be shown in the rendered map.
void setCoordinateTransform (const QgsCoordinateTransform *t)
 Sets coordinate transformation.
void setMapToPixel (const QgsMapToPixel &mtp)
void setExtent (const QgsRectangle &extent)
void setDrawEditingInformation (bool b)
void setRenderingStopped (bool stopped)
void setScaleFactor (double factor)
void setRasterScaleFactor (double factor)
void setRendererScale (double scale)
void setPainter (QPainter *p)
void setForceVectorOutput (bool force)
void setLabelingEngine (QgsLabelingEngineInterface *iface)
void setSelectionColor (const QColor &color)
void setShowSelection (const bool showSelection)
 Sets whether vector selections should be shown in the rendered map.
bool useRenderingOptimization () const
 Returns true if the rendering optimization (geometry simplification) can be executed.
void setUseRenderingOptimization (bool enabled)
const QgsVectorSimplifyMethodvectorSimplifyMethod () const
 Added in QGIS v2.4.
void setVectorSimplifyMethod (const QgsVectorSimplifyMethod &simplifyMethod)

Static Public Member Functions

static QgsRenderContext fromMapSettings (const QgsMapSettings &mapSettings)
 create initialized QgsRenderContext instance from given QgsMapSettings

Detailed Description

Contains information about the context of a rendering operation.

The context of a rendering operation defines properties such as the conversion ratio between screen and map units, the extents / bounding box to be rendered etc.

Constructor & Destructor Documentation

QgsRenderContext::QgsRenderContext ( )
QgsRenderContext::~QgsRenderContext ( )

Member Function Documentation

const QPainter* QgsRenderContext::constPainter ( ) const
inline
const QgsCoordinateTransform* QgsRenderContext::coordinateTransform ( ) const
inline
bool QgsRenderContext::drawEditingInformation ( ) const
inline
const QgsRectangle& QgsRenderContext::extent ( ) const
inline
bool QgsRenderContext::forceVectorOutput ( ) const
inline
QgsRenderContext QgsRenderContext::fromMapSettings ( const QgsMapSettings mapSettings)
static

create initialized QgsRenderContext instance from given QgsMapSettings

Note
added in 2.4
QgsLabelingEngineInterface* QgsRenderContext::labelingEngine ( ) const
inline
const QgsMapToPixel& QgsRenderContext::mapToPixel ( ) const
inline
QPainter* QgsRenderContext::painter ( )
inline
double QgsRenderContext::rasterScaleFactor ( ) const
inline
double QgsRenderContext::rendererScale ( ) const
inline
bool QgsRenderContext::renderingStopped ( ) const
inline
double QgsRenderContext::scaleFactor ( ) const
inline
QColor QgsRenderContext::selectionColor ( ) const
inline
void QgsRenderContext::setCoordinateTransform ( const QgsCoordinateTransform t)

Sets coordinate transformation.

QgsRenderContext does not take ownership

void QgsRenderContext::setDrawEditingInformation ( bool  b)
inline
void QgsRenderContext::setExtent ( const QgsRectangle extent)
inline
void QgsRenderContext::setForceVectorOutput ( bool  force)
inline
void QgsRenderContext::setLabelingEngine ( QgsLabelingEngineInterface iface)
inline
void QgsRenderContext::setMapToPixel ( const QgsMapToPixel mtp)
inline
void QgsRenderContext::setPainter ( QPainter *  p)
inline
void QgsRenderContext::setRasterScaleFactor ( double  factor)
inline
void QgsRenderContext::setRendererScale ( double  scale)
inline
void QgsRenderContext::setRenderingStopped ( bool  stopped)
inline
void QgsRenderContext::setScaleFactor ( double  factor)
inline
void QgsRenderContext::setSelectionColor ( const QColor &  color)
inline
void QgsRenderContext::setShowSelection ( const bool  showSelection)
inline

Sets whether vector selections should be shown in the rendered map.

Parameters
showSelectionset to true if selections should be shown
See Also
showSelection
setSelectionColor
Note
Added in QGIS v2.4
void QgsRenderContext::setUseAdvancedEffects ( bool  enabled)
inline

Used to enable or disable advanced effects such as blend modes.

void QgsRenderContext::setUseRenderingOptimization ( bool  enabled)
inline
void QgsRenderContext::setVectorSimplifyMethod ( const QgsVectorSimplifyMethod simplifyMethod)
inline
bool QgsRenderContext::showSelection ( ) const
inline

Returns true if vector selections should be shown in the rendered map.

Returns
true if selections should be shown
See Also
setShowSelection
selectionColor
Note
Added in QGIS v2.4
bool QgsRenderContext::useAdvancedEffects ( ) const
inline

Returns true if advanced effects such as blend modes such be used.

bool QgsRenderContext::useRenderingOptimization ( ) const
inline

Returns true if the rendering optimization (geometry simplification) can be executed.

const QgsVectorSimplifyMethod& QgsRenderContext::vectorSimplifyMethod ( ) const
inline

Added in QGIS v2.4.


The documentation for this class was generated from the following files: