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

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.

Definition at line 39 of file qgsrendercontext.h.

Constructor & Destructor Documentation

QgsRenderContext::QgsRenderContext ( )

Definition at line 23 of file qgsrendercontext.cpp.

QgsRenderContext::~QgsRenderContext ( )

Definition at line 40 of file qgsrendercontext.cpp.

Member Function Documentation

const QPainter* QgsRenderContext::constPainter ( ) const
inline

Definition at line 52 of file qgsrendercontext.h.

const QgsCoordinateTransform* QgsRenderContext::coordinateTransform ( ) const
inline

Definition at line 54 of file qgsrendercontext.h.

bool QgsRenderContext::drawEditingInformation ( ) const
inline

Definition at line 73 of file qgsrendercontext.h.

const QgsRectangle& QgsRenderContext::extent ( ) const
inline

Definition at line 56 of file qgsrendercontext.h.

bool QgsRenderContext::forceVectorOutput ( ) const
inline

Definition at line 66 of file qgsrendercontext.h.

QgsRenderContext QgsRenderContext::fromMapSettings ( const QgsMapSettings mapSettings)
static

create initialized QgsRenderContext instance from given QgsMapSettings

Note
added in 2.4

Definition at line 44 of file qgsrendercontext.cpp.

QgsLabelingEngineInterface* QgsRenderContext::labelingEngine ( ) const
inline

Definition at line 77 of file qgsrendercontext.h.

const QgsMapToPixel& QgsRenderContext::mapToPixel ( ) const
inline

Definition at line 58 of file qgsrendercontext.h.

QPainter* QgsRenderContext::painter ( )
inline

Definition at line 51 of file qgsrendercontext.h.

double QgsRenderContext::rasterScaleFactor ( ) const
inline

Definition at line 62 of file qgsrendercontext.h.

double QgsRenderContext::rendererScale ( ) const
inline

Definition at line 75 of file qgsrendercontext.h.

bool QgsRenderContext::renderingStopped ( ) const
inline

Definition at line 64 of file qgsrendercontext.h.

double QgsRenderContext::scaleFactor ( ) const
inline

Definition at line 60 of file qgsrendercontext.h.

QColor QgsRenderContext::selectionColor ( ) const
inline

Definition at line 79 of file qgsrendercontext.h.

void QgsRenderContext::setCoordinateTransform ( const QgsCoordinateTransform t)

Sets coordinate transformation.

QgsRenderContext does not take ownership

Definition at line 67 of file qgsrendercontext.cpp.

void QgsRenderContext::setDrawEditingInformation ( bool  b)
inline

Definition at line 95 of file qgsrendercontext.h.

void QgsRenderContext::setExtent ( const QgsRectangle extent)
inline

Definition at line 94 of file qgsrendercontext.h.

void QgsRenderContext::setForceVectorOutput ( bool  force)
inline

Definition at line 101 of file qgsrendercontext.h.

void QgsRenderContext::setLabelingEngine ( QgsLabelingEngineInterface iface)
inline

Definition at line 102 of file qgsrendercontext.h.

void QgsRenderContext::setMapToPixel ( const QgsMapToPixel mtp)
inline

Definition at line 93 of file qgsrendercontext.h.

void QgsRenderContext::setPainter ( QPainter *  p)
inline

Definition at line 100 of file qgsrendercontext.h.

void QgsRenderContext::setRasterScaleFactor ( double  factor)
inline

Definition at line 98 of file qgsrendercontext.h.

void QgsRenderContext::setRendererScale ( double  scale)
inline

Definition at line 99 of file qgsrendercontext.h.

void QgsRenderContext::setRenderingStopped ( bool  stopped)
inline

Definition at line 96 of file qgsrendercontext.h.

void QgsRenderContext::setScaleFactor ( double  factor)
inline

Definition at line 97 of file qgsrendercontext.h.

void QgsRenderContext::setSelectionColor ( const QColor &  color)
inline

Definition at line 103 of file qgsrendercontext.h.

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

Definition at line 111 of file qgsrendercontext.h.

void QgsRenderContext::setUseAdvancedEffects ( bool  enabled)
inline

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

Definition at line 71 of file qgsrendercontext.h.

void QgsRenderContext::setUseRenderingOptimization ( bool  enabled)
inline

Definition at line 115 of file qgsrendercontext.h.

void QgsRenderContext::setVectorSimplifyMethod ( const QgsVectorSimplifyMethod simplifyMethod)
inline

Definition at line 119 of file qgsrendercontext.h.

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

Definition at line 87 of file qgsrendercontext.h.

bool QgsRenderContext::useAdvancedEffects ( ) const
inline

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

Definition at line 69 of file qgsrendercontext.h.

bool QgsRenderContext::useRenderingOptimization ( ) const
inline

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

Definition at line 114 of file qgsrendercontext.h.

const QgsVectorSimplifyMethod& QgsRenderContext::vectorSimplifyMethod ( ) const
inline

Added in QGIS v2.4.

Definition at line 118 of file qgsrendercontext.h.


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