QGIS API Documentation
2.0.1-Dufour
|
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 QgsCoordinateTransform * | coordinateTransform () const |
const QgsRectangle & | extent () const |
const QgsMapToPixel & | mapToPixel () 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 |
QgsLabelingEngineInterface * | labelingEngine () const |
Added in QGIS v1.4. | |
QColor | selectionColor () const |
Added in QGIS v2.0. | |
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) |
Added in QGIS v1.5. | |
void | setLabelingEngine (QgsLabelingEngineInterface *iface) |
Added in QGIS v1.4. | |
void | setSelectionColor (const QColor &color) |
Added in QGIS v2.0. |
Private Attributes | |
QPainter * | mPainter |
Painter for rendering operations. | |
const QgsCoordinateTransform * | mCoordTransform |
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. | |
bool | mUseAdvancedEffects |
Flag if advanced visual effects such as blend modes should be used. | |
QgsMapToPixel | mMapToPixel |
bool | mRenderingStopped |
True if the rendering has been canceled. | |
double | mScaleFactor |
Factor to scale line widths and point marker sizes. | |
double | mRasterScaleFactor |
Factor to scale rasters. | |
double | mRendererScale |
Map scale. | |
QgsLabelingEngineInterface * | mLabelingEngine |
Labeling engine (can be NULL) | |
QColor | mSelectionColor |
Color used for features that are marked as selected. |
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.
QgsRenderContext::QgsRenderContext | ( | ) |
Definition at line 21 of file qgsrendercontext.cpp.
QgsRenderContext::~QgsRenderContext | ( | ) |
Definition at line 36 of file qgsrendercontext.cpp.
|
inline |
Definition at line 46 of file qgsrendercontext.h.
|
inline |
Definition at line 48 of file qgsrendercontext.h.
Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPoint(), QgsFeatureRendererV2::_getPolygon(), QgsRasterLayer::draw(), and QgsLabel::renderLabel().
|
inline |
Definition at line 69 of file qgsrendercontext.h.
|
inline |
Definition at line 50 of file qgsrendercontext.h.
Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::drawLabels(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), QgsVectorLayer::prepareLabelingAndDiagrams(), and QgsPointDisplacementRenderer::startRender().
|
inline |
Definition at line 60 of file qgsrendercontext.h.
Referenced by QgsSvgMarkerSymbolLayerV2::renderPoint(), and QgsSimpleMarkerSymbolLayerV2::startRender().
|
inline |
Added in QGIS v1.4.
Definition at line 74 of file qgsrendercontext.h.
Referenced by QgsVectorLayer::drawRendererV2(), QgsVectorLayer::drawRendererV2Levels(), QgsVectorLayer::prepareLabelingAndDiagrams(), and QgsMapRenderer::render().
|
inline |
Definition at line 52 of file qgsrendercontext.h.
Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPoint(), QgsFeatureRendererV2::_getPolygon(), QgsPointPatternFillSymbolLayer::applyPattern(), QgsPalLayerSettings::checkMinimumSizeMM(), QgsDiagramRendererV2::convertSizeToMapUnits(), QgsRasterLayer::draw(), QgsPalLabeling::drawLabel(), QgsPalLabeling::drawLabelBackground(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), QgsSymbolLayerV2Utils::pixelSizeScaleFactor(), QgsPalLayerSettings::registerFeature(), QgsMapRenderer::render(), QgsLabel::renderLabel(), and QgsPalLayerSettings::scaleToPixelContext().
|
inline |
Definition at line 45 of file qgsrendercontext.h.
Referenced by QgsRasterLayer::draw(), QgsPointDisplacementRenderer::drawCircle(), QgsPalLabeling::drawLabel(), QgsPalLabeling::drawLabelBackground(), QgsPalLabeling::drawLabelBuffer(), QgsPalLabeling::drawLabeling(), QgsPointDisplacementRenderer::drawLabels(), QgsPalLabeling::drawLabelShadow(), QgsVectorFieldSymbolLayer::drawPreviewIcon(), QgsMapRenderer::render(), QgsPointDisplacementRenderer::renderFeature(), QgsLabel::renderLabel(), QgsEllipseSymbolLayerV2::renderPoint(), QgsSimpleMarkerSymbolLayerV2::renderPoint(), QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsFontMarkerSymbolLayerV2::renderPoint(), QgsSimpleFillSymbolLayerV2::renderPolygon(), QgsImageFillSymbolLayer::renderPolygon(), QgsSimpleLineSymbolLayerV2::renderPolyline(), and QgsFeatureRendererV2::renderVertexMarker().
|
inline |
Definition at line 56 of file qgsrendercontext.h.
Referenced by QgsSVGFillSymbolLayer::applyPattern(), QgsLinePatternFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), QgsRasterLayer::draw(), QgsPalLabeling::drawLabel(), QgsPointDisplacementRenderer::drawLabels(), QgsSymbolLayerV2Utils::pixelSizeScaleFactor(), QgsPalLabeling::prepareLayer(), QgsMapRenderer::render(), QgsLabel::renderLabel(), QgsSimpleMarkerSymbolLayerV2::renderPoint(), QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsPalLayerSettings::scaleToPixelContext(), QgsSimpleFillSymbolLayerV2::startRender(), QgsSimpleLineSymbolLayerV2::startRender(), and QgsSimpleMarkerSymbolLayerV2::startRender().
|
inline |
Definition at line 71 of file qgsrendercontext.h.
Referenced by QgsVectorLayer::drawLabels(), QgsPalLabeling::prepareLayer(), QgsPalLayerSettings::registerFeature(), QgsMapRenderer::render(), QgsPointDisplacementRenderer::startRender(), and QgsRuleBasedRendererV2::Rule::startRender().
|
inline |
Definition at line 58 of file qgsrendercontext.h.
Referenced by QgsVectorLayer::drawRendererV2(), QgsVectorLayer::drawRendererV2Levels(), and QgsMapRenderer::render().
|
inline |
Definition at line 54 of file qgsrendercontext.h.
Referenced by QgsSVGFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), QgsPalLayerSettings::checkMinimumSizeMM(), QgsDiagramRendererV2::convertSizeToMapUnits(), QgsRasterLayer::draw(), QgsPalLabeling::drawLabelBackground(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), QgsSymbolLayerV2Utils::pixelSizeScaleFactor(), QgsPalLabeling::prepareLayer(), QgsPalLayerSettings::registerFeature(), QgsMapRenderer::render(), QgsLabel::renderLabel(), QgsSvgMarkerSymbolLayerV2::renderPoint(), and QgsPalLayerSettings::scaleToPixelContext().
|
inline |
Added in QGIS v2.0.
Definition at line 77 of file qgsrendercontext.h.
Referenced by QgsVectorLayer::drawRendererV2Levels(), QgsSimpleMarkerSymbolLayerV2::prepareCache(), QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsFontMarkerSymbolLayerV2::renderPoint(), QgsImageFillSymbolLayer::renderPolygon(), QgsSimpleFillSymbolLayerV2::startRender(), QgsSimpleLineSymbolLayerV2::startRender(), and QgsSimpleMarkerSymbolLayerV2::startRender().
void QgsRenderContext::setCoordinateTransform | ( | const QgsCoordinateTransform * | t | ) |
Sets coordinate transformation.
QgsRenderContext does not take ownership
Definition at line 40 of file qgsrendercontext.cpp.
References mCoordTransform.
Referenced by QgsMapRenderer::render().
|
inline |
Definition at line 85 of file qgsrendercontext.h.
Referenced by QgsComposerMap::draw(), and QgsMapRenderer::render().
|
inline |
Definition at line 84 of file qgsrendercontext.h.
Referenced by QgsMapRenderer::adjustExtentToSize(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), and QgsMapRenderer::render().
|
inline |
Added in QGIS v1.5.
Definition at line 92 of file qgsrendercontext.h.
Referenced by QgsPointPatternFillSymbolLayer::applyPattern(), and QgsComposerMap::draw().
|
inline |
Added in QGIS v1.4.
Definition at line 94 of file qgsrendercontext.h.
Referenced by QgsMapRenderer::render().
|
inline |
Definition at line 83 of file qgsrendercontext.h.
Referenced by QgsMapRenderer::adjustExtentToSize(), QgsPointPatternFillSymbolLayer::applyPattern(), QgsPalLabeling::drawLabelBackground(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), and QgsMapRenderer::render().
|
inline |
Definition at line 90 of file qgsrendercontext.h.
Referenced by QgsPointPatternFillSymbolLayer::applyPattern(), QgsSymbolLayerV2Utils::createRenderContext(), QgsComposerMap::drawGridLine(), QgsPalLabeling::drawLabelBackground(), QgsComposerMap::drawOverviewMapExtent(), QgsMapRenderer::render(), and QgsMapCanvasItem::setRenderContextVariables().
|
inline |
Definition at line 88 of file qgsrendercontext.h.
Referenced by QgsPointPatternFillSymbolLayer::applyPattern(), QgsSymbolLayerV2Utils::createRenderContext(), QgsComposerMap::drawGridLine(), QgsComposerMap::drawOverviewMapExtent(), QgsMapRenderer::render(), and QgsMapCanvasItem::setRenderContextVariables().
|
inline |
Definition at line 89 of file qgsrendercontext.h.
Referenced by QgsVectorLayer::countSymbolFeatures(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), QgsMapRenderer::render(), QgsVectorFileWriter::renderContext(), and QgsMapCanvasItem::setRenderContextVariables().
|
inline |
Definition at line 86 of file qgsrendercontext.h.
Referenced by QgsComposerMap::draw(), QgsVectorLayer::onCacheImageDelete(), QgsMapCanvas::paintEvent(), QgsMapRenderer::render(), and QgsMapCanvas::setRenderFlag().
|
inline |
Definition at line 87 of file qgsrendercontext.h.
Referenced by QgsPointPatternFillSymbolLayer::applyPattern(), QgsSymbolLayerV2Utils::createRenderContext(), QgsComposerMap::drawGridLine(), QgsPalLabeling::drawLabelBackground(), QgsComposerMap::drawOverviewMapExtent(), QgsMapRenderer::render(), and QgsMapCanvasItem::setRenderContextVariables().
|
inline |
Added in QGIS v2.0.
Definition at line 96 of file qgsrendercontext.h.
Referenced by QgsMapRenderer::render().
|
inline |
Used to enable or disable advanced effects such as blend modes.
Definition at line 67 of file qgsrendercontext.h.
Referenced by QgsComposerMap::draw().
|
inline |
Returns true if advanced effects such as blend modes such be used.
Definition at line 64 of file qgsrendercontext.h.
Referenced by QgsPalLabeling::drawLabel(), QgsPalLabeling::drawLabelBackground(), QgsPalLabeling::drawLabelBuffer(), QgsPalLabeling::drawLabelShadow(), and QgsMapRenderer::render().
|
private |
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().
|
private |
True if vertex markers for editing should be drawn.
Definition at line 107 of file qgsrendercontext.h.
|
private |
Definition at line 109 of file qgsrendercontext.h.
|
private |
If true then no rendered vector elements should be cached as image.
Definition at line 112 of file qgsrendercontext.h.
|
private |
Labeling engine (can be NULL)
Definition at line 132 of file qgsrendercontext.h.
|
private |
Definition at line 117 of file qgsrendercontext.h.
|
private |
Painter for rendering operations.
Definition at line 101 of file qgsrendercontext.h.
|
private |
Factor to scale rasters.
Definition at line 126 of file qgsrendercontext.h.
|
private |
Map scale.
Definition at line 129 of file qgsrendercontext.h.
|
private |
True if the rendering has been canceled.
Definition at line 120 of file qgsrendercontext.h.
|
private |
Factor to scale line widths and point marker sizes.
Definition at line 123 of file qgsrendercontext.h.
|
private |
Color used for features that are marked as selected.
Definition at line 135 of file qgsrendercontext.h.
|
private |
Flag if advanced visual effects such as blend modes should be used.
True by default
Definition at line 115 of file qgsrendercontext.h.