QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
static QgsGeometry | calculateFeatureRequestGeometry (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, bool &shouldFilter) |
Returns the geometry representing the intersection of clipping regions from context. | |
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. | |
static QPainterPath | calculatePainterClipRegion (const QList< QgsMapClippingRegion > ®ions, const QgsRenderContext &context, Qgis::LayerType 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. | |
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. | |
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 81 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 38 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 183 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 |
layerType | the layer type to filter |
Definition at line 127 of file qgsmapclippingutils.cpp.
|
static |
Collects the list of map clipping regions from a context which apply to a map layer.
Definition at line 24 of file qgsmapclippingutils.cpp.