QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Utility functions for use when clipping map renders. More...
#include <qgsmapclippingutils.h>
Static Public Member Functions | |
static QgsGeometry | calculateFeatureIntersectionGeometry (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, bool &shouldClip) |
Returns the geometry representing the intersection of clipping regions from context which should be used to clip individual feature geometries prior to rendering. More... | |
static QgsGeometry | calculateFeatureRequestGeometry (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, bool &shouldFilter) |
Returns the geometry representing the intersection of clipping regions from context. More... | |
static QgsGeometry | calculateLabelIntersectionGeometry (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, bool &shouldClip) |
Returns the geometry representing the intersection of clipping regions from context which should be used to clip individual feature geometries while registering them with labeling engines. More... | |
static QPainterPath | calculatePainterClipRegion (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, QgsMapLayerType layerType, bool &shouldClip) |
Returns a QPainterPath representing the intersection of clipping regions from context which should be used to clip the painter during rendering of a layer of the specified layerType. More... | |
static QList< QgsMapClippingRegion > | collectClippingRegionsForLayer (const QgsRenderContext &context, const QgsMapLayer *layer) |
Collects the list of map clipping regions from a context which apply to a map layer. More... | |
Utility functions for use when clipping map renders.
Definition at line 39 of file qgsmapclippingutils.h.
|
static |
Returns the geometry representing the intersection of clipping regions from context which should be used to clip individual feature geometries prior to rendering.
The returned geometry will be automatically reprojected into the same CRS as the source layer, ready for use for clipping features.
regions | list of clip regions which apply to the layer |
context | a render context |
shouldClip | will be set to true if layer's features should be filtered, i.e. one or more clipping regions applies to the layer |
Definition at line 80 of file qgsmapclippingutils.cpp.
|
static |
Returns the geometry representing the intersection of clipping regions from context.
The returned geometry will be automatically reprojected into the same CRS as the source layer, ready for use for filtering a feature request.
regions | list of clip regions which apply to the layer |
context | a render context |
shouldFilter | will be set to true if layer's features should be filtered, i.e. one or more clipping regions applies to the layer |
Definition at line 37 of file qgsmapclippingutils.cpp.
|
static |
Returns the geometry representing the intersection of clipping regions from context which should be used to clip individual feature geometries while registering them with labeling engines.
The returned geometry will be automatically reprojected into the same CRS as the source layer, ready for use for clipping features.
regions | list of clip regions which apply to the layer |
context | a render context |
shouldClip | will be set to true if layer's features should be clipped for labeling, i.e. one or more clipping regions applies to the layer |
Definition at line 179 of file qgsmapclippingutils.cpp.
|
static |
Returns a QPainterPath representing the intersection of clipping regions from context which should be used to clip the painter during rendering of a layer of the specified layerType.
The returned coordinates are in painter coordinates for the destination context.
regions | list of clip regions which apply to the layer |
context | a render context |
shouldClip | will be set to true if the clipping path should be applied |
Definition at line 126 of file qgsmapclippingutils.cpp.
|
static |
Collects the list of map clipping regions from a context which apply to a map layer.
Definition at line 23 of file qgsmapclippingutils.cpp.