QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
A map clipping region (in map coordinates and CRS). More...
#include <qgsmapclippingregion.h>
Public Types | |
enum | FeatureClippingType : int { FeatureClippingType::ClipToIntersection, FeatureClippingType::ClipPainterOnly, FeatureClippingType::NoClipping } |
Feature clipping behavior, which controls how features from vector layers will be clipped. More... | |
Public Member Functions | |
QgsMapClippingRegion (const QgsGeometry &geometry) | |
Constructor for a map clipping region, with the specified geometry in the destination map CRS. More... | |
bool | appliesToLayer (const QgsMapLayer *layer) const |
Returns true if the clipping region should be applied to the specified map layer. More... | |
FeatureClippingType | featureClip () const |
Returns the feature clipping type. More... | |
QgsGeometry | geometry () const |
Returns the geometry of the clipping region (in the destination map CRS). More... | |
QList< QgsMapLayer * > | restrictedLayers () const |
Returns the list of layers to restrict the clipping region effects to. More... | |
bool | restrictToLayers () const |
Returns true if clipping should be restricted to a subset of layers. More... | |
void | setFeatureClip (FeatureClippingType type) |
Sets the feature clipping type. More... | |
void | setGeometry (const QgsGeometry &geometry) |
Sets the clipping region geometry (in the destination map CRS). More... | |
void | setRestrictedLayers (const QList< QgsMapLayer * > &layers) |
Sets a list of layers to restrict the clipping region effects to. More... | |
void | setRestrictToLayers (bool enabled) |
Sets whether clipping should be restricted to a subset of layers. More... | |
A map clipping region (in map coordinates and CRS).
Definition at line 31 of file qgsmapclippingregion.h.
|
strong |
Feature clipping behavior, which controls how features from vector layers will be clipped.
Definition at line 39 of file qgsmapclippingregion.h.
|
inlineexplicit |
Constructor for a map clipping region, with the specified geometry in the destination map CRS.
Definition at line 49 of file qgsmapclippingregion.h.
bool QgsMapClippingRegion::appliesToLayer | ( | const QgsMapLayer * | layer | ) | const |
Returns true
if the clipping region should be applied to the specified map layer.
Definition at line 40 of file qgsmapclippingregion.cpp.
|
inline |
Returns the feature clipping type.
This setting is only used while rendering vector layers, for other layer types it is ignored.
Definition at line 74 of file qgsmapclippingregion.h.
QgsGeometry QgsMapClippingRegion::geometry | ( | ) | const |
Returns the geometry of the clipping region (in the destination map CRS).
Definition at line 20 of file qgsmapclippingregion.cpp.
QList< QgsMapLayer * > QgsMapClippingRegion::restrictedLayers | ( | ) | const |
Returns the list of layers to restrict the clipping region effects to.
If the list is empty then the clipping will be applied to all layers.
true
.Definition at line 35 of file qgsmapclippingregion.cpp.
bool QgsMapClippingRegion::restrictToLayers | ( | ) | const |
Returns true
if clipping should be restricted to a subset of layers.
Definition at line 55 of file qgsmapclippingregion.cpp.
|
inline |
Sets the feature clipping type.
This setting is only used while rendering vector layers, for other layer types it is ignored.
Definition at line 86 of file qgsmapclippingregion.h.
void QgsMapClippingRegion::setGeometry | ( | const QgsGeometry & | geometry | ) |
Sets the clipping region geometry (in the destination map CRS).
Definition at line 25 of file qgsmapclippingregion.cpp.
void QgsMapClippingRegion::setRestrictedLayers | ( | const QList< QgsMapLayer * > & | layers | ) |
Sets a list of layers to restrict the clipping region effects to.
By default the clipping region applies to all layers.
true
.Definition at line 30 of file qgsmapclippingregion.cpp.
void QgsMapClippingRegion::setRestrictToLayers | ( | bool | enabled | ) |
Sets whether clipping should be restricted to a subset of layers.
Definition at line 60 of file qgsmapclippingregion.cpp.