File: qgssymbolrendercontext.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 (271 lines) | stat: -rw-r--r-- 7,181 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/symbology/qgssymbolrendercontext.h                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsSymbolRenderContext
{

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


    QgsSymbolRenderContext( QgsRenderContext &c, Qgis::RenderUnit u, qreal opacity = 1.0, bool selected = false, Qgis::SymbolRenderHints renderHints = Qgis::SymbolRenderHints(), const QgsFeature *f = 0, const QgsFields &fields = QgsFields(), const QgsMapUnitScale &mapUnitScale = QgsMapUnitScale() );
%Docstring
Constructor for QgsSymbolRenderContext

:param c: 
:param u: 
:param opacity: value between 0 (fully transparent) and 1 (fully opaque)
:param selected: set to ``True`` if symbol should be drawn in a
                 "selected" state
:param renderHints: flags controlling rendering behavior
:param f: 
:param fields: 
:param mapUnitScale: 
%End

    ~QgsSymbolRenderContext();


    QgsRenderContext &renderContext();
%Docstring
Returns a reference to the context's render context.
%End


    void setOriginalValueVariable( const QVariant &value );
%Docstring
Sets the original value variable value for data defined symbology

:param value: value for original value variable. This usually represents
              the symbol property value before any data defined
              overrides have been applied.
%End

 Qgis::RenderUnit outputUnit() const /Deprecated/;
%Docstring
Returns the output unit for the context.

.. deprecated:: 3.40

   No longer used and will be removed in QGIS 4.0.
%End

 void setOutputUnit( Qgis::RenderUnit u ) /Deprecated/;
%Docstring
Sets the output unit for the context.

.. deprecated:: 3.40

   No longer used and will be removed in QGIS 4.0.
%End

 QgsMapUnitScale mapUnitScale() const /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Will be removed in QGIS 4.0.
%End

 void setMapUnitScale( const QgsMapUnitScale &scale ) /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Will be removed in QGIS 4.0.
%End

    qreal opacity() const;
%Docstring
Returns the opacity for the symbol.

:return: opacity value between 0 (fully transparent) and 1 (fully
         opaque)

.. seealso:: :py:func:`setOpacity`
%End

    void setOpacity( qreal opacity );
%Docstring
Sets the ``opacity`` for the symbol.

:param opacity: opacity value between 0 (fully transparent) and 1 (fully
                opaque)

.. seealso:: :py:func:`opacity`
%End

    bool selected() const;
%Docstring
Returns ``True`` if symbols should be rendered using the selected symbol
coloring and style.

.. seealso:: :py:func:`setSelected`
%End

    void setSelected( bool selected );
%Docstring
Sets whether symbols should be rendered using the selected symbol
coloring and style.

.. seealso:: :py:func:`selected`
%End

    Qgis::SymbolRenderHints renderHints() const;
%Docstring
Returns the rendering hint flags for the symbol.

.. seealso:: :py:func:`setRenderHints`
%End

    bool forceVectorRendering() const;
%Docstring
Returns ``True`` if symbol must be rendered using vector methods, and
optimisations like pre-rendered images must be disabled.

.. versionadded:: 3.40
%End

    void setRenderHints( Qgis::SymbolRenderHints hints );
%Docstring
Sets rendering hint flags for the symbol.

.. seealso:: :py:func:`renderHints`
%End

    void setRenderHint( Qgis::SymbolRenderHint hint, bool enabled = true );
%Docstring
Sets a rendering ``hint`` flag for the symbol.

.. seealso:: :py:func:`renderHints`

.. versionadded:: 3.40
%End

    void setFeature( const QgsFeature *f );

    const QgsFeature *feature() const;
%Docstring
Returns the current feature being rendered. This may be ``None``.
%End

    void setOriginalGeometryType( Qgis::GeometryType type );
%Docstring
Sets the geometry type for the original feature geometry being rendered.

.. seealso:: :py:func:`originalGeometryType`
%End

    Qgis::GeometryType originalGeometryType() const;
%Docstring
Returns the geometry type for the original feature geometry being
rendered. This can be useful if symbol layers alter their appearance
based on geometry type - eg offsetting a simple line style will look
different if the simple line is rendering a polygon feature (a closed
buffer) vs a line feature (an unclosed offset line).

.. seealso:: :py:func:`originalGeometryType`
%End

    QgsFields fields() const;
%Docstring
Fields of the layer. Currently only available in
:py:func:`~QgsSymbolRenderContext.startRender` calls to allow symbols
with data-defined properties prepare the expressions (other times
:py:func:`~QgsSymbolRenderContext.fields` returns an empty
:py:class:`QgsFields` object).
%End

    int geometryPartCount() const;
%Docstring
Part count of current geometry
%End

    void setGeometryPartCount( int count );
%Docstring
Sets the part count of current geometry
%End

    int geometryPartNum() const;
%Docstring
Part number of current geometry
%End

    void setGeometryPartNum( int num );
%Docstring
Sets the part number of current geometry
%End

 double outputLineWidth( double width ) const /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Use the size conversion methods in :py:class:`QgsRenderContext` instead.
%End

 double outputPixelSize( double size ) const /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Use the size conversion methods in :py:class:`QgsRenderContext` instead.
%End


    QgsExpressionContextScope *expressionContextScope();
%Docstring
This scope is always available when a symbol of this type is being
rendered.

:return: An expression scope for details about this symbol
%End

    void setExpressionContextScope( QgsExpressionContextScope *contextScope /Transfer/ );
%Docstring
Set an expression scope for this symbol.

Will take ownership.

:param contextScope: An expression scope for details about this symbol
%End

    const QgsLegendPatchShape *patchShape() const;
%Docstring
Returns the symbol patch shape, to use if rendering symbol preview
icons.

.. seealso:: :py:func:`setPatchShape`

.. versionadded:: 3.14
%End

    void setPatchShape( const QgsLegendPatchShape &shape );
%Docstring
Sets the symbol patch ``shape``, to use if rendering symbol preview
icons.

.. seealso:: :py:func:`patchShape`

.. versionadded:: 3.14
%End

  private:
    QgsSymbolRenderContext( const QgsSymbolRenderContext &rh );
};



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