QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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. More...
 
void setUseAdvancedEffects (bool enabled)
 Used to enable or disable advanced effects such as blend modes. More...
 
bool drawEditingInformation () const
 
double rendererScale () const
 
QgsLabelingEngineInterfacelabelingEngine () const
 Added in QGIS v1.4. More...
 
QColor selectionColor () const
 Added in QGIS v2.0. More...
 
bool showSelection () const
 Returns true if vector selections should be shown in the rendered map. More...
 
void setCoordinateTransform (const QgsCoordinateTransform *t)
 Sets coordinate transformation. More...
 
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)
 Added in QGIS v1.5. More...
 
void setLabelingEngine (QgsLabelingEngineInterface *iface)
 Added in QGIS v1.4. More...
 
void setSelectionColor (const QColor &color)
 Added in QGIS v2.0. More...
 
void setShowSelection (const bool showSelection)
 Sets whether vector selections should be shown in the rendered map. More...
 
bool useRenderingOptimization () const
 Returns true if the rendering optimization (geometry simplification) can be executed. More...
 
void setUseRenderingOptimization (bool enabled)
 
const QgsVectorSimplifyMethodvectorSimplifyMethod () const
 Added in QGIS v2.4. More...
 
void setVectorSimplifyMethod (const QgsVectorSimplifyMethod &simplifyMethod)
 

Static Public Member Functions

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

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

Added in QGIS v1.4.

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

Added in QGIS v2.0.

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

Added in QGIS v1.5.

void QgsRenderContext::setLabelingEngine ( QgsLabelingEngineInterface iface)
inline

Added in QGIS v1.4.

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

Added in QGIS v2.0.

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.

Note
: added in version 1.9
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.

Note
added in 1.9
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: