File: qgssymbol.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 (992 lines) | stat: -rw-r--r-- 28,326 bytes parent folder | download | duplicates (6)
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/symbology/qgssymbol.h                                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




typedef QList<QgsSymbolLayer *> QgsSymbolLayerList;

class QgsSymbolAnimationSettings
{
%Docstring(signature="appended")
Contains settings relating to symbol animation.

.. versionadded:: 3.26
%End

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

    void setIsAnimated( bool animated );
%Docstring
Sets whether the symbol is animated.

This is a user-facing setting for symbols, which allows users to define
whether a symbol is animated, and allows for creation of animated
symbols via data defined properties.

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

    bool isAnimated() const;
%Docstring
Returns ``True`` if the symbol is animated.

This is a user-facing setting for symbols, which allows users to define
whether a symbol is animated, and allows for creation of animated
symbols via data defined properties.

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

    void setFrameRate( double rate );
%Docstring
Sets the symbol animation frame ``rate`` (in frames per second).

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

    double frameRate() const;
%Docstring
Returns the symbol animation frame rate (in frames per second).

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

};


class QgsSymbolBufferSettings
{
%Docstring(signature="appended")
Contains settings relating to symbol buffers, which draw a "halo" effect
around the symbol.

.. versionadded:: 3.40
%End

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

    QgsSymbolBufferSettings();
    ~QgsSymbolBufferSettings();

    QgsSymbolBufferSettings( const QgsSymbolBufferSettings &other );

    bool enabled() const;
%Docstring
Returns whether the buffer is enabled.

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

    void setEnabled( bool enabled );
%Docstring
Sets whether the symbol buffer will be drawn.

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

    double size() const;
%Docstring
Returns the size of the buffer.

.. seealso:: :py:func:`sizeUnit`

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

    void setSize( double size );
%Docstring
Sets the ``size`` of the buffer.

The size units are specified using
:py:func:`~QgsSymbolBufferSettings.setSizeUnit`.

.. seealso:: :py:func:`size`

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

    Qgis::RenderUnit sizeUnit() const;
%Docstring
Returns the units for the buffer size.

.. seealso:: :py:func:`size`

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

    void setSizeUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` used for the buffer size.

.. seealso:: :py:func:`setSize`

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

    QgsMapUnitScale sizeMapUnitScale() const;
%Docstring
Returns the map unit scale object for the buffer size. This is only used
if the buffer size is set to :py:class:`QgsUnitTypes`.RenderMapUnit.

.. seealso:: :py:func:`setSizeMapUnitScale`

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

    void setSizeMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` object for the buffer size.

This is only used if the buffer size is set to
:py:class:`QgsUnitTypes`.RenderMapUnit.

.. seealso:: :py:func:`sizeMapUnitScale`

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

    Qt::PenJoinStyle joinStyle() const;
%Docstring
Returns the buffer join style.

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

    void setJoinStyle( Qt::PenJoinStyle style );
%Docstring
Sets the join ``style`` used for drawing the buffer.

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

    QgsFillSymbol *fillSymbol() const;
%Docstring
Returns the fill symbol used to render the buffer.

Ownership is not transferred.

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

    void setFillSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the fill ``symbol`` used to render the buffer. Ownership of
``symbol`` is transferred to the buffer.

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


    void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const;
%Docstring
Writes the buffer settings to an XML ``element``.

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

    void readXml( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads the buffer settings from an XML ``element``.

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

};


class QgsSymbol
{
%Docstring(signature="appended")
Abstract base class for all rendered symbols.
%End

%TypeHeaderCode
#include "qgssymbol.h"
%End
%ConvertToSubClassCode
    switch ( sipCpp->type() )
    {
      case Qgis::SymbolType::Marker: sipType = sipType_QgsMarkerSymbol; break;
      case Qgis::SymbolType::Line: sipType = sipType_QgsLineSymbol; break;
      case Qgis::SymbolType::Fill: sipType = sipType_QgsFillSymbol; break;
      default: sipType = 0; break;
    }
%End
  public:

    static QString symbolTypeToString( Qgis::SymbolType type );
%Docstring
Returns a translated string version of the specified symbol ``type``.

.. versionadded:: 3.20
%End

    static Qgis::SymbolType symbolTypeForGeometryType( Qgis::GeometryType type );
%Docstring
Returns the default symbol type required for the specified geometry
``type``.

.. versionadded:: 3.20
%End


    enum class Property /BaseType=IntEnum/
    {
      Opacity,
    };

    static const QgsPropertiesDefinition &propertyDefinitions();
%Docstring
Returns the symbol property definitions.

.. versionadded:: 3.18
%End

    virtual ~QgsSymbol();

    static QgsSymbol *defaultSymbol( Qgis::GeometryType geomType ) /Factory/;
%Docstring
Returns a new default symbol for the specified geometry type.

The caller takes ownership of the returned object.
%End

    Qgis::SymbolType type() const;
%Docstring
Returns the symbol's type.
%End


    QgsSymbolLayerList symbolLayers() const;
%Docstring
Returns the list of symbol layers contained in the symbol.

:return: symbol layers list

.. seealso:: :py:func:`symbolLayer`

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


    SIP_PYOBJECT symbolLayer( int layer ) /TypeHint="QgsSymbolLayer"/;
%Docstring
Returns the symbol layer at the specified index.

:raises IndexError: if no layer with the specified index exists.

.. seealso:: :py:func:`symbolLayers`

.. seealso:: :py:func:`symbolLayerCount`
%End
%MethodCode
    const int count = sipCpp->symbolLayerCount();
    if ( a0 < 0 || a0 >= count )
    {
      PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
      sipIsErr = 1;
    }
    else
    {
      sipRes = sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
    }
%End

    int symbolLayerCount() const;
%Docstring
Returns the total number of symbol layers contained in the symbol.

:return: count of symbol layers

.. seealso:: :py:func:`symbolLayers`

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


    Py_ssize_t __len__() const;
%Docstring
Returns the number of symbol layers contained in the symbol.
%End
%MethodCode
    sipRes = sipCpp->symbolLayerCount();
%End

    //! Ensures that bool(obj) returns ``True`` (otherwise __len__() would be used)
    int __bool__() const;
%MethodCode
    sipRes = true;
%End

    SIP_PYOBJECT __getitem__( int index ) /TypeHint="QgsSymbolLayer"/;
%Docstring
Returns the symbol layer at the specified ``index``.

Indexes can be less than 0, in which case they correspond to layers from
the end of the symbol. E.g. an index of -1 corresponds to the last layer
in the symbol.

:raises IndexError: if no layer with the specified ``index`` exists.

.. versionadded:: 3.10
%End
%MethodCode
    const int count = sipCpp->symbolLayerCount();
    if ( a0 < -count || a0 >= count )
    {
      PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
      sipIsErr = 1;
    }
    else if ( a0 >= 0 )
    {
      return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
    }
    else
    {
      return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
    }
%End

    void __delitem__( int index );
%Docstring
Deletes the layer at the specified ``index``.

Indexes can be less than 0, in which case they correspond to layers from
the end of the symbol. E.g. an index of -1 corresponds to the last layer
in the symbol.

:raises IndexError: if no layer at the specified ``index`` exists

.. versionadded:: 3.10
%End
%MethodCode
    const int count = sipCpp->symbolLayerCount();
    if ( a0 >= 0 && a0 < count )
      sipCpp->deleteSymbolLayer( a0 );
    else if ( a0 < 0 && a0 >= -count )
      sipCpp->deleteSymbolLayer( count + a0 );
    else
    {
      PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
      sipIsErr = 1;
    }
%End

    bool insertSymbolLayer( int index, QgsSymbolLayer *layer /Transfer/ );
%Docstring
Inserts a symbol ``layer`` to specified ``index``. Ownership of
``layer`` is transferred to the symbol.

:param index: The index at which the layer should be added
:param layer: The symbol layer to add

:return: ``True`` if the layer is added, ``False`` if the index or the
         layer is bad
%End

    bool appendSymbolLayer( QgsSymbolLayer *layer /Transfer/ );
%Docstring
Appends a symbol ``layer`` at the end of the current symbol layer list.
Ownership of ``layer`` is transferred to the symbol.

:return: ``True`` if the layer was successfully added, ``False`` if the
         layer is not compatible with the symbol's
         :py:func:`~QgsSymbol.type`.
%End

    bool deleteSymbolLayer( int index );
%Docstring
Removes and deletes the symbol layer at the specified ``index``.
%End

    QgsSymbolLayer *takeSymbolLayer( int index ) /TransferBack/;
%Docstring
Removes a symbol layer from the list and returns a pointer to it.
Ownership of the layer is handed to the caller.

:param index: The index of the layer to remove

:return: A pointer to the removed layer
%End

    bool changeSymbolLayer( int index, QgsSymbolLayer *layer /Transfer/ );
%Docstring
Deletes the current layer at the specified ``index`` and replaces it
with ``layer``. Ownership of ``layer`` is transferred to the symbol.

Returns ``False`` if ``layer`` is not compatible with the symbol's
:py:func:`~QgsSymbol.type`, or ``True`` if the layer was successfully
replaced.
%End

    void startRender( QgsRenderContext &context, const QgsFields &fields = QgsFields() );
%Docstring
Begins the rendering process for the symbol. This must be called before
:py:func:`~QgsSymbol.renderFeature`, and should be followed by a call to
:py:func:`~QgsSymbol.stopRender`.

:param context: render context which symbol will be drawn using
:param fields: fields for features to be rendered (usually the
               associated vector layer's fields). Required for correct
               calculation of data defined overrides.

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

    void stopRender( QgsRenderContext &context );
%Docstring
Ends the rendering process. This should be called after rendering all
desired features.

:param context: render context, must match the context specified when
                :py:func:`~QgsSymbol.startRender` was called.

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

    void setColor( const QColor &color ) const;
%Docstring
Sets the ``color`` for the symbol.

Calling this method sets the color for each individual symbol layer
contained within the symbol to ``color``.

Locked symbol layers are skipped and are left unchanged.

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

    QColor color() const;
%Docstring
Returns the symbol's color.

For multi-layer symbols, this method returns the color of the first
unlocked symbol layer.

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

    void drawPreviewIcon( QPainter *painter, QSize size, QgsRenderContext *customContext = 0, bool selected = false, const QgsExpressionContext *expressionContext = 0,
                          const QgsLegendPatchShape *patchShape = 0, const QgsScreenProperties &screen = QgsScreenProperties() );
%Docstring
Draws an icon of the symbol that occupies an area given by ``size``
using the specified ``painter``.

Optionally a custom render context may be given in order to ensure that
the preview icon exactly matches the settings from that context.

:param painter: destination painter
:param size: size of the icon
:param customContext: the context in which the rendering happens
:param selected: set to ``True`` to render the symbol in a selected
                 state (since QGIS 3.10)
:param expressionContext: optional custom expression context
:param patchShape: optional patch shape to use for symbol preview. If
                   not specified a default shape will be used instead.
:param screen: can be used to specify the destination screen properties
               for the icon. This allows the icon to be generated using
               the correct DPI and device pixel ratio for the target
               screen (since QGIS 3.32)

.. seealso:: :py:func:`exportImage`

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

    void exportImage( const QString &path, const QString &format, QSize size );
%Docstring
Export the symbol as an image format, to the specified ``path`` and with
the given ``size``.

If ``format`` is "SVG" then an SVG file will be created, otherwise a
raster image of the specified format will be created.

.. seealso:: :py:func:`asImage`

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

    QImage asImage( QSize size, QgsRenderContext *customContext = 0 );
%Docstring
Returns an image of the symbol at the specified ``size``.

Optionally a custom render context may be given in order to ensure that
the preview icon exactly matches the settings from that context.

.. seealso:: :py:func:`exportImage`

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

    QImage bigSymbolPreviewImage( QgsExpressionContext *expressionContext = 0, Qgis::SymbolPreviewFlags flags = Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols, const QgsScreenProperties &screen = QgsScreenProperties() ) /PyName=bigSymbolPreviewImageV2/;
%Docstring
Returns a large (roughly 100x100 pixel) preview image for the symbol.

:param expressionContext: optional expression context, for evaluation of
                          data defined symbol properties
:param flags: optional flags to control how preview image is generated
:param screen: can be used to specify the destination screen properties
               for the icon. This allows the icon to be generated using
               the correct DPI and device pixel ratio for a target
               screen (since QGIS 3.32)

.. seealso:: :py:func:`asImage`

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

 QImage bigSymbolPreviewImage( QgsExpressionContext *expressionContext = 0, int flags = static_cast< int >( Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) ) /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Use bigSymbolPreviewImageV2 instead.
%End

    QString dump() const;
%Docstring
Returns a string dump of the symbol's properties.
%End

    virtual QgsSymbol *clone() const = 0 /Factory/;
%Docstring
Returns a deep copy of this symbol.

Ownership is transferred to the caller.
%End

    void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props ) const;
%Docstring
Converts the symbol to a SLD representation.
%End

    Qgis::RenderUnit outputUnit() const;
%Docstring
Returns the units to use for sizes and widths within the symbol.
Individual symbol layer definitions will interpret this in different
ways, e.g., a marker symbol may use it to specify the units for the
marker size, while a line symbol may use it to specify the units for the
line width.

:return: output unit, or :py:class:`QgsUnitTypes`.RenderUnknownUnit if
         the symbol contains mixed units

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

    bool usesMapUnits() const;
%Docstring
Returns ``True`` if the symbol has any components which use map unit
based sizes.

.. versionadded:: 3.18
%End

    void setOutputUnit( Qgis::RenderUnit unit ) const;
%Docstring
Sets the units to use for sizes and widths within the symbol. Individual
symbol definitions will interpret this in different ways, e.g., a marker
symbol may use it to specify the units for the marker size, while a line
symbol may use it to specify the units for the line width.

:param unit: output units

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

    QgsMapUnitScale mapUnitScale() const;
%Docstring
Returns the map unit scale for the symbol.

If the symbol consists of multiple layers, the map unit scale is only
returned if all layers have the same scale settings. If the settings
differ, a default constructed map unit scale is returned.

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

    void setMapUnitScale( const QgsMapUnitScale &scale ) const;
%Docstring
Sets the map unit ``scale`` for the symbol.

Calling this method sets the scale for all symbol layers contained
within the symbol.

.. seealso:: :py:func:`mapUnitScale`
%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

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

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

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

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

    void setFlags( Qgis::SymbolFlags flags );
%Docstring
Sets ``flags`` for the symbol.

.. seealso:: :py:func:`flags`

.. versionadded:: 3.320
%End

    Qgis::SymbolFlags flags() const;
%Docstring
Returns flags for the symbol.

.. seealso:: :py:func:`setFlags`

.. versionadded:: 3.20
%End

    void setClipFeaturesToExtent( bool clipFeaturesToExtent );
%Docstring
Sets whether features drawn by the symbol should be clipped to the
render context's extent. If this option is enabled then features which
are partially outside the extent will be clipped. This speeds up
rendering of the feature, but may have undesirable side effects for
certain symbol types.

:param clipFeaturesToExtent: set to ``True`` to enable clipping
                             (defaults to ``True``)

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

    bool clipFeaturesToExtent() const;
%Docstring
Returns whether features drawn by the symbol will be clipped to the
render context's extent. If this option is enabled then features which
are partially outside the extent will be clipped. This speeds up
rendering of the feature, but may have undesirable side effects for
certain symbol types.

:return: ``True`` if features will be clipped

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

    void setForceRHR( bool force );
%Docstring
Sets whether polygon features drawn by the symbol should be reoriented
to follow the standard right-hand-rule orientation, in which the area
that is bounded by the polygon is to the right of the boundary. In
particular, the exterior ring is oriented in a clockwise direction and
the interior rings in a counter-clockwise direction.

.. seealso:: :py:func:`forceRHR`

.. versionadded:: 3.6
%End

    bool forceRHR() const;
%Docstring
Returns ``True`` if polygon features drawn by the symbol will be
reoriented to follow the standard right-hand-rule orientation, in which
the area that is bounded by the polygon is to the right of the boundary.
In particular, the exterior ring is oriented in a clockwise direction
and the interior rings in a counter-clockwise direction.

.. seealso:: :py:func:`setForceRHR`

.. versionadded:: 3.6
%End

    QgsSymbolBufferSettings *bufferSettings();
%Docstring
Returns the symbol buffer settings, which control an optional "halo"
effect around the symbol.

Will be ``None`` if no buffer settings have previously been set for the
symbol.

.. seealso:: :py:func:`setBufferSettings`

.. versionadded:: 3.40
%End


    void setBufferSettings( QgsSymbolBufferSettings *settings /Transfer/ );
%Docstring
Sets a the symbol buffer ``settings``, which control an optional "halo"
effect around the symbol.

Ownership is transferred to the symbol.

.. seealso:: :py:func:`bufferSettings`

.. versionadded:: 3.40
%End

    QgsSymbolAnimationSettings &animationSettings();
%Docstring
Returns a reference to the symbol animation settings.

.. seealso:: :py:func:`setAnimationSettings`

.. versionadded:: 3.26
%End


    void setAnimationSettings( const QgsSymbolAnimationSettings &settings );
%Docstring
Sets a the symbol animation ``settings``.

.. seealso:: :py:func:`animationSettings`

.. versionadded:: 3.26
%End

    QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
%Docstring
Returns a list of attributes required to render this feature. This
should include any attributes required by the symbology including the
ones required by expressions.
%End

    void setDataDefinedProperty( Property key, const QgsProperty &property );
%Docstring
Sets a data defined property for the symbol. Any existing property with
the same key will be overwritten.

.. seealso:: :py:func:`dataDefinedProperties`

.. seealso:: Property

.. versionadded:: 3.18
%End

    QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the symbol's property collection, used for data
defined overrides.

.. seealso:: :py:func:`setDataDefinedProperties`

.. seealso:: Property

.. versionadded:: 3.18
%End


    void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the symbol's property collection, used for data defined overrides.

:param collection: property collection. Existing properties will be
                   replaced.

.. seealso:: :py:func:`dataDefinedProperties`

.. versionadded:: 3.18
%End

    bool hasDataDefinedProperties() const;
%Docstring
Returns whether the symbol utilizes any data defined properties.
%End

    bool canCauseArtifactsBetweenAdjacentTiles() const;
%Docstring
Returns ``True`` if the symbol rendering can cause visible artifacts
across a single feature when the feature is rendered as a series of
adjacent map tiles each containing a portion of the feature's geometry.

Internally this calls
:py:func:`QgsSymbolLayer.canCauseArtifactsBetweenAdjacentTiles()` for
all symbol layers in the symbol and returns ``True`` if any of the
layers returned ``True``.

.. versionadded:: 3.18
%End

 void setLayer( const QgsVectorLayer *layer ) /Deprecated/;
%Docstring
.. note::

   the layer will be ``None`` after stopRender

.. deprecated:: 3.40

   Will be removed in QGIS 4.0.
%End

 const QgsVectorLayer *layer() const /Deprecated/;
%Docstring
.. deprecated:: 3.40

   Will be removed in QGIS 4.0.
%End

    void renderFeature( const QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false, Qgis::VertexMarkerType currentVertexMarkerType = Qgis::VertexMarkerType::SemiTransparentCircle, double currentVertexMarkerSize = 0.0 ) throw( QgsCsException );
%Docstring
Render a feature. Before calling this the
:py:func:`~QgsSymbol.startRender` method should be called to initialize
the rendering process. After rendering all features
:py:func:`~QgsSymbol.stopRender` must be called.
%End

    QgsSymbolRenderContext *symbolRenderContext();
%Docstring
Returns the symbol render context. Only valid between startRender and
stopRender calls.

:return: The symbol render context
%End

    void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );
%Docstring
Called before symbol layers will be rendered for a particular
``feature``.

This is always followed by a call to
:py:func:`~QgsSymbol.stopFeatureRender` after the feature has been
completely rendered (i.e. all parts have been rendered).

Internally, this notifies all symbol layers which will be used via a
call to :py:func:`QgsSymbolLayer.startFeatureRender()`.

.. versionadded:: 3.20
%End

    void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );
%Docstring
Called after symbol layers have been rendered for a particular
``feature``.

This is always preceded by a call to
:py:func:`~QgsSymbol.startFeatureRender` just before the feature will be
rendered.

Internally, this notifies all symbol layers which were used via a call
to :py:func:`QgsSymbolLayer.stopFeatureRender()`.

.. versionadded:: 3.20
%End

  protected:

    QgsSymbol( Qgis::SymbolType type, const QgsSymbolLayerList &layers /Transfer/ ); // can't be instantiated

    static QPointF _getPoint( QgsRenderContext &context, const QgsPoint &point );
%Docstring
Creates a point in screen coordinates from a :py:class:`QgsPoint` in map
coordinates
%End

    static QPolygonF _getLineString( QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent = true );
%Docstring
Creates a line string in screen coordinates from a :py:class:`QgsCurve`
in map coordinates
%End

    static QPolygonF _getPolygonRing( QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent, bool isExteriorRing = false, bool correctRingOrientation = false );
%Docstring
Creates a polygon ring in screen coordinates from a :py:class:`QgsCurve`
in map coordinates.

If ``correctRingOrientation`` is ``True`` then the ring will be oriented
to match standard ring orientation, e.g. clockwise for exterior rings
and counter-clockwise for interior rings.
%End

    static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes, QgsRenderContext &context, const QgsPolygon &polygon, bool clipToExtent = true, bool correctRingOrientation = false );
%Docstring
Creates a polygon in screen coordinates from a
:py:class:`QgsPolygonXYin` map coordinates

If ``correctRingOrientation`` is ``True`` then the ring will be oriented
to match standard ring orientation, e.g. clockwise for exterior rings
and counter-clockwise for interior rings.
%End

    QgsSymbolLayerList cloneLayers() const /Factory/;
%Docstring
Retrieve a cloned list of all layers that make up this symbol. Ownership
is transferred to the caller.
%End

    void copyCommonProperties( const QgsSymbol *other );
%Docstring
Copies common properties from an ``other`` symbol to this symbol.

.. versionadded:: 3.40
%End

    void renderUsingLayer( QgsSymbolLayer *layer, QgsSymbolRenderContext &context, Qgis::GeometryType geometryType = Qgis::GeometryType::Unknown, const QPolygonF *points = 0, const QVector<QPolygonF> *rings = 0 );
%Docstring
Renders a context using a particular symbol layer without passing in a
geometry. This is used as fallback, if the symbol being rendered is not
compatible with the specified layer. In such a case, this method can be
called and will call the layer's rendering method anyway but the
geometry passed to the layer will be empty. This is required for layers
that generate their own geometry from other information in the rendering
context.

Since QGIS 3.22, the optional ``geometryType``, ``points`` and ``rings``
arguments can specify the original geometry type, points and rings in
which are being rendered by the parent symbol.
%End

    void renderVertexMarker( QPointF pt, QgsRenderContext &context, Qgis::VertexMarkerType currentVertexMarkerType, double currentVertexMarkerSize );
%Docstring
Render editing vertex marker at specified point
%End








  private:
    QgsSymbol( const QgsSymbol & );
};

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