File: qgsmapclippingutils.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (111 lines) | stat: -rw-r--r-- 4,735 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsmapclippingutils.h                                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsMapClippingUtils
{
%Docstring(signature="appended")
Utility functions for use when clipping map renders.

.. versionadded:: 3.16
%End

%TypeHeaderCode
#include "qgsmapclippingutils.h"
%End
  public:

    static QList< QgsMapClippingRegion > collectClippingRegionsForLayer( const QgsRenderContext &context, const QgsMapLayer *layer );
%Docstring
Collects the list of map clipping regions from a ``context`` which apply
to a map ``layer``.
%End

    static QgsGeometry calculateFeatureRequestGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldFilter );
%Docstring
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.

:param regions: list of clip regions which apply to the layer
:param context: a render context
:param shouldFilter: will be set to ``True`` if layer's features should
                     be filtered, i.e. one or more clipping regions
                     applies to the layer

:return: combined clipping region for use when filtering features to
         render
%End

    static QgsGeometry calculateFeatureIntersectionGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldClip );
%Docstring
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.

:param regions: list of clip regions which apply to the layer
:param context: a render context
:param shouldClip: will be set to ``True`` if layer's features should be
                   filtered, i.e. one or more clipping regions applies
                   to the layer

:return: combined clipping region for use when rendering features
%End

    static QPainterPath calculatePainterClipRegion( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, Qgis::LayerType layerType, bool &shouldClip );
%Docstring
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``.

:param regions: list of clip regions which apply to the layer
:param context: a render context
:param shouldClip: will be set to ``True`` if the clipping path should
                   be applied
:param layerType: the layer type to filter

:return: combined painter clipping region for use when rendering maps
%End

    static QgsGeometry calculateLabelIntersectionGeometry( const QList< QgsMapClippingRegion > &regions, const QgsRenderContext &context, bool &shouldClip );
%Docstring
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.

:param regions: list of clip regions which apply to the layer
:param context: a render context
:param 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

:return: combined clipping region for use when labeling features
%End
};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsmapclippingutils.h                                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/