QGIS API Documentation 3.27.0-Master (75dc696944)
qgsmapclippingutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmapclippingutils.h
3 --------------------------------------
4 Date : June 2020
5 Copyright : (C) 2020 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSMAPCLIPPINGUTILS_H
17#define QGSMAPCLIPPINGUTILS_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
21#include "qgis.h"
22
23#include <QList>
24#include <QPainterPath>
25
27class QgsMapLayer;
28class QgsGeometry;
30
39class CORE_EXPORT QgsMapClippingUtils
40{
41 public:
42
46 static QList< QgsMapClippingRegion > collectClippingRegionsForLayer( const QgsRenderContext &context, const QgsMapLayer *layer );
47
60 static QgsGeometry calculateFeatureRequestGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldFilter );
61
74 static QgsGeometry calculateFeatureIntersectionGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldClip );
75
89 static QPainterPath calculatePainterClipRegion( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, QgsMapLayerType layerType, bool &shouldClip );
90
103 static QgsGeometry calculateLabelIntersectionGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldClip );
104};
105
106#endif // QGSMAPCLIPPINGUTILS_H
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:125
A map clipping region (in map coordinates and CRS).
Utility functions for use when clipping map renders.
Base class for all map layer types.
Definition: qgsmaplayer.h:73
Contains information about the context of a rendering operation.
QgsMapLayerType
Types of layers that can be added to a map.
Definition: qgis.h:47