Class: QgsRandomMarkerFillSymbolLayer¶
A fill symbol layer which places markers at random locations within polygons.
Added in version 3.12.
Class Hierarchy¶
Base classes¶
Abstract base class for fill symbol layers. |
|
Abstract base class for symbol layers. |
Enums
alias of |
Methods
Returns |
|
Returns the count method used to randomly fill the polygon. |
|
Returns the density area used to count the number of points to randomly fill the polygon. |
|
Returns the units for the density area. |
|
Returns the map scale for the density area. |
|
Returns the count of random points to render in the fill. |
|
Returns the random number seed to use when generating points, or 0 if a truly random sequence will be used (causing points to appear in different locations with every map refresh). |
|
Sets whether point markers should be clipped to the polygon boundary. |
|
Sets the count method used to randomly fill the polygon. |
|
Sets the density area used to count the number of points to randomly fill the polygon. |
|
Sets the units for the density area. |
|
Sets the map scale for the density area. |
|
Sets the count of random points to render in the fill. |
|
Sets the random number seed to use when generating points, or 0 if a truly random sequence will be used on every rendering (causing points to appear in different locations with every map refresh). |
Static Methods
Creates a new |
- class qgis.core.QgsRandomMarkerFillSymbolLayer[source]¶
Bases:
QgsFillSymbolLayer
- __init__(pointCount: int = 10, method: Qgis.PointCountMethod = Qgis.PointCountMethod.Absolute, densityArea: float = 250, seed: int = 0)
Constructor for QgsRandomMarkerFillSymbolLayer, with the specified
pointCount
.Optionally a specific random number
seed
can be used when generating points. Aseed
of 0 indicates that a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.- Parameters:
pointCount (int = 10)
method (Qgis.PointCountMethod = Qgis.PointCountMethod.Absolute)
densityArea (float = 250)
seed (int = 0)
- CountMethod¶
alias of
PointCountMethod
- clipPoints(self) bool [source]¶
Returns
True
if point markers should be clipped to the polygon boundary.See also
- Return type:
bool
- countMethod(self) Qgis.PointCountMethod [source]¶
Returns the count method used to randomly fill the polygon.
See also
- Return type:
- static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None [source]¶
Creates a new
QgsRandomMarkerFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).Caller takes ownership of the returned symbol layer.
- Parameters:
properties (Dict[str, Any] = {})
- Return type:
Optional[QgsSymbolLayer]
- densityArea(self) float [source]¶
Returns the density area used to count the number of points to randomly fill the polygon.
Only used when the count method is set to QgsRandomMarkerFillSymbolLayer.DensityBasedCount.
Units are specified by
setDensityAreaUnit()
.See also
- Return type:
float
- densityAreaUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the density area.
See also
- Return type:
- densityAreaUnitScale(self) QgsMapUnitScale ¶
Returns the map scale for the density area.
See also
See also
See also
- Return type:
- pointCount(self) int [source]¶
Returns the count of random points to render in the fill.
See also
- Return type:
int
- seed(self) int ¶
Returns the random number seed to use when generating points, or 0 if a truly random sequence will be used (causing points to appear in different locations with every map refresh).
See also
- Return type:
int
- setClipPoints(self, clipped: bool)[source]¶
Sets whether point markers should be
clipped
to the polygon boundary.See also
- Parameters:
clipped (bool)
- setCountMethod(self, method: Qgis.PointCountMethod)[source]¶
Sets the count
method
used to randomly fill the polygon.See also
- Parameters:
method (Qgis.PointCountMethod)
- setDensityArea(self, area: float)[source]¶
Sets the density
area
used to count the number of points to randomly fill the polygon.See also
- Parameters:
area (float)
- setDensityAreaUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the units for the density area.
- Parameters:
unit (Qgis.RenderUnit) – width units
See also
- setDensityAreaUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the map scale for the density area.
- Parameters:
scale (QgsMapUnitScale) – density area map unit scale
See also
See also
See also