Quantum GIS API Documentation  master-ce49b66
QgsRenderContext Class Reference

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

#include <qgsrendercontext.h>

+ Collaboration diagram for QgsRenderContext:

List of all members.

Public Member Functions

 QgsRenderContext ()
 ~QgsRenderContext ()
const QPainter * constPainter () const
const QgsCoordinateTransformcoordinateTransform () const
bool drawEditingInformation () const
const QgsRectangleextent () const
bool forceVectorOutput () const
QgsLabelingEngineInterfacelabelingEngine () const
 Added in QGIS v1.4.
const QgsMapToPixelmapToPixel () const
QPainter * painter ()
double rasterScaleFactor () const
double rendererScale () const
bool renderingStopped () const
double scaleFactor () const
QColor selectionColor () const
 Added in QGIS v2.0.
void setCoordinateTransform (const QgsCoordinateTransform *t)
 Sets coordinate transformation.
void setDrawEditingInformation (bool b)
void setExtent (const QgsRectangle &extent)
void setForceVectorOutput (bool force)
 Added in QGIS v1.5.
void setLabelingEngine (QgsLabelingEngineInterface *iface)
 Added in QGIS v1.4.
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)
 Added in QGIS v2.0.
void setUseAdvancedEffects (bool enabled)
 Used to enable or disable advanced effects such as blend modes.
bool useAdvancedEffects () const
 Returns true if advanced effects such as blend modes such be used.

Private Attributes

const QgsCoordinateTransformmCoordTransform
 For transformation between coordinate systems.
bool mDrawEditingInformation
 True if vertex markers for editing should be drawn.
QgsRectangle mExtent
bool mForceVectorOutput
 If true then no rendered vector elements should be cached as image.
QgsLabelingEngineInterfacemLabelingEngine
 Labeling engine (can be NULL)
QgsMapToPixel mMapToPixel
QPainter * mPainter
 Painter for rendering operations.
double mRasterScaleFactor
 Factor to scale rasters.
double mRendererScale
 Map scale.
bool mRenderingStopped
 True if the rendering has been canceled.
double mScaleFactor
 Factor to scale line widths and point marker sizes.
QColor mSelectionColor
 Color used for features that are marked as selected.
bool mUseAdvancedEffects
 Flag if advanced visual effects such as blend modes should be used.

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 37 of file qgsrendercontext.h.


Constructor & Destructor Documentation


Member Function Documentation

const QPainter* QgsRenderContext::constPainter ( ) const [inline]

Definition at line 46 of file qgsrendercontext.h.

Definition at line 69 of file qgsrendercontext.h.

bool QgsRenderContext::forceVectorOutput ( ) const [inline]

Definition at line 60 of file qgsrendercontext.h.

Referenced by QgsSimpleMarkerSymbolLayerV2::startRender().

Sets coordinate transformation.

QgsRenderContext does not take ownership

Definition at line 40 of file qgsrendercontext.cpp.

References mCoordTransform.

Referenced by QgsMapRenderer::render().

Definition at line 85 of file qgsrendercontext.h.

Referenced by QgsComposerMap::draw(), and QgsMapRenderer::render().

void QgsRenderContext::setForceVectorOutput ( bool  force) [inline]

Added in QGIS v1.5.

Definition at line 92 of file qgsrendercontext.h.

Referenced by QgsPointPatternFillSymbolLayer::applyPattern(), and QgsComposerMap::draw().

Added in QGIS v1.4.

Definition at line 94 of file qgsrendercontext.h.

Referenced by QgsMapRenderer::render().

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

Added in QGIS v2.0.

Definition at line 96 of file qgsrendercontext.h.

Referenced by QgsMapRenderer::render().

void QgsRenderContext::setUseAdvancedEffects ( bool  enabled) [inline]

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

Note:
: added in version 1.9

Definition at line 67 of file qgsrendercontext.h.

Referenced by QgsComposerMap::draw().

bool QgsRenderContext::useAdvancedEffects ( ) const [inline]

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

Note:
added in 1.9

Definition at line 64 of file qgsrendercontext.h.

Referenced by QgsPalLabeling::drawLabel(), QgsPalLabeling::drawLabelBackground(), QgsPalLabeling::drawLabelBuffer(), QgsPalLabeling::drawLabelShadow(), and QgsMapRenderer::render().


Member Data Documentation

For transformation between coordinate systems.

Can be 0 if on-the-fly reprojection is not used

Definition at line 104 of file qgsrendercontext.h.

Referenced by setCoordinateTransform().

True if vertex markers for editing should be drawn.

Definition at line 107 of file qgsrendercontext.h.

Definition at line 109 of file qgsrendercontext.h.

If true then no rendered vector elements should be cached as image.

Definition at line 112 of file qgsrendercontext.h.

Labeling engine (can be NULL)

Definition at line 132 of file qgsrendercontext.h.

Definition at line 117 of file qgsrendercontext.h.

QPainter* QgsRenderContext::mPainter [private]

Painter for rendering operations.

Definition at line 101 of file qgsrendercontext.h.

Factor to scale rasters.

Definition at line 126 of file qgsrendercontext.h.

Map scale.

Definition at line 129 of file qgsrendercontext.h.

True if the rendering has been canceled.

Definition at line 120 of file qgsrendercontext.h.

Factor to scale line widths and point marker sizes.

Definition at line 123 of file qgsrendercontext.h.

Color used for features that are marked as selected.

Definition at line 135 of file qgsrendercontext.h.

Flag if advanced visual effects such as blend modes should be used.

True by default

Definition at line 115 of file qgsrendercontext.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines