QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
A map clipping region (in map coordinates and CRS). More...
#include <qgsmapclippingregion.h>
Public Types | |
enum class | FeatureClippingType : int { ClipToIntersection , ClipPainterOnly , 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. | |
bool | appliesToLayer (const QgsMapLayer *layer) const |
Returns true if the clipping region should be applied to the specified map layer. | |
FeatureClippingType | featureClip () const |
Returns the feature clipping type. | |
QgsGeometry | geometry () const |
Returns the geometry of the clipping region (in the destination map CRS). | |
QList< QgsMapLayer * > | restrictedLayers () const |
Returns the list of layers to restrict the clipping region effects to. | |
bool | restrictToLayers () const |
Returns true if clipping should be restricted to a subset of layers. | |
void | setFeatureClip (FeatureClippingType type) |
Sets the feature clipping type. | |
void | setGeometry (const QgsGeometry &geometry) |
Sets the clipping region geometry (in the destination map CRS). | |
void | setRestrictedLayers (const QList< QgsMapLayer * > &layers) |
Sets a list of layers to restrict the clipping region effects to. | |
void | setRestrictToLayers (bool enabled) |
Sets whether clipping should be restricted to a subset of layers. | |
A map clipping region (in map coordinates and CRS).
Definition at line 33 of file qgsmapclippingregion.h.
|
strong |
Feature clipping behavior, which controls how features from vector layers will be clipped.
Definition at line 41 of file qgsmapclippingregion.h.
|
inlineexplicit |
Constructor for a map clipping region, with the specified geometry in the destination map CRS.
Definition at line 51 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 76 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 88 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.