@@ -687,6 +687,10 @@ Will take ownership.
687
687
688
688
class QgsMarkerSymbol : QgsSymbol
689
689
{
690
+ %Docstring
691
+
692
+ A marker symbol type, for rendering Point and MultiPoint geometries.
693
+ %End
690
694
691
695
%TypeHeaderCode
692
696
#include "qgssymbol.h"
@@ -700,6 +704,11 @@ This is a convenience method for easier creation of marker symbols.
700
704
%End
701
705
702
706
QgsMarkerSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() );
707
+ %Docstring
708
+ Constructor for QgsMarkerSymbol, with the specified list of initial symbol ``layers``.
709
+
710
+ Ownership of the ``layers`` are transferred to the symbol.
711
+ %End
703
712
704
713
void setAngle( double symbolAngle );
705
714
%Docstring
@@ -770,14 +779,37 @@ will be scaled to maintain their current relative size to the whole symbol size.
770
779
771
780
double size() const;
772
781
%Docstring
773
- Returns the size for the whole symbol, which is the maximum size of
782
+ Returns the estimated size for the whole symbol, which is the maximum size of
774
783
all marker symbol layers in the symbol.
775
784
785
+ .. warning::
786
+
787
+ This returned value is inaccurate if the symbol consists of multiple
788
+ symbol layers with different size units. Use the overload accepting a :py:class:`QgsRenderContext`
789
+ argument instead for accurate sizes in this case.
790
+
776
791
.. seealso:: :py:func:`setSize`
777
792
778
793
.. seealso:: :py:func:`sizeUnit`
779
794
780
795
.. seealso:: :py:func:`sizeMapUnitScale`
796
+ %End
797
+
798
+ double size( const QgsRenderContext &context ) const;
799
+ %Docstring
800
+ Returns the symbol size, in painter units. This is the maximum size of
801
+ all marker symbol layers in the symbol.
802
+
803
+ This method returns an accurate size by calculating the actual rendered
804
+ size of each symbol layer using the provided render ``context``.
805
+
806
+ .. seealso:: :py:func:`setSize`
807
+
808
+ .. seealso:: :py:func:`sizeUnit`
809
+
810
+ .. seealso:: :py:func:`sizeMapUnitScale`
811
+
812
+ .. versionadded:: 3.4.5
781
813
%End
782
814
783
815
void setSizeUnit( QgsUnitTypes::RenderUnit unit );
@@ -890,6 +922,10 @@ and stopRender() calls, or data defined rotation and offset will not be correctl
890
922
891
923
class QgsLineSymbol : QgsSymbol
892
924
{
925
+ %Docstring
926
+
927
+ A line symbol type, for rendering LineString and MultiLineString geometries.
928
+ %End
893
929
894
930
%TypeHeaderCode
895
931
#include "qgssymbol.h"
@@ -903,9 +939,46 @@ This is a convenience method for easier creation of line symbols.
903
939
%End
904
940
905
941
QgsLineSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() );
942
+ %Docstring
943
+ Constructor for QgsLineSymbol, with the specified list of initial symbol ``layers``.
944
+
945
+ Ownership of the ``layers`` are transferred to the symbol.
946
+ %End
906
947
907
948
void setWidth( double width );
949
+ %Docstring
950
+ Sets the ``width`` for the whole line symbol. Individual symbol layer sizes
951
+ will be scaled to maintain their current relative size to the whole symbol size.
952
+
953
+ .. seealso:: :py:func:`width`
954
+ %End
955
+
908
956
double width() const;
957
+ %Docstring
958
+ Returns the estimated width for the whole symbol, which is the maximum width of
959
+ all marker symbol layers in the symbol.
960
+
961
+ .. warning::
962
+
963
+ This returned value is inaccurate if the symbol consists of multiple
964
+ symbol layers with different width units. Use the overload accepting a :py:class:`QgsRenderContext`
965
+ argument instead for accurate sizes in this case.
966
+
967
+ .. seealso:: :py:func:`setWidth`
968
+ %End
969
+
970
+ double width( const QgsRenderContext &context ) const;
971
+ %Docstring
972
+ Returns the symbol width, in painter units. This is the maximum width of
973
+ all marker symbol layers in the symbol.
974
+
975
+ This method returns an accurate width by calculating the actual rendered
976
+ width of each symbol layer using the provided render ``context``.
977
+
978
+ .. seealso:: :py:func:`setWidth`
979
+
980
+ .. versionadded:: 3.4.5
981
+ %End
909
982
910
983
void setDataDefinedWidth( const QgsProperty &property );
911
984
%Docstring
@@ -938,6 +1011,10 @@ Returns data defined width for whole symbol (including all symbol layers).
938
1011
939
1012
class QgsFillSymbol : QgsSymbol
940
1013
{
1014
+ %Docstring
1015
+
1016
+ A fill symbol type, for rendering Polygon and MultiPolygon geometries.
1017
+ %End
941
1018
942
1019
%TypeHeaderCode
943
1020
#include "qgssymbol.h"
@@ -951,6 +1028,11 @@ This is a convenience method for easier creation of fill symbols.
951
1028
%End
952
1029
953
1030
QgsFillSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() );
1031
+ %Docstring
1032
+ Constructor for QgsFillSymbol, with the specified list of initial symbol ``layers``.
1033
+
1034
+ Ownership of the ``layers`` are transferred to the symbol.
1035
+ %End
954
1036
void setAngle( double angle );
955
1037
void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, const QgsFeature *f, QgsRenderContext &context, int layer = -1, bool selected = false );
956
1038
0 commit comments