Class: QgsPointPatternFillSymbolLayer¶
- class qgis.core.QgsPointPatternFillSymbolLayer¶
Bases:
QgsImageFillSymbolLayer
A fill symbol layer which fills polygon shapes with repeating marker symbols.
Methods
- param context:
Returns the marker clipping mode, which defines how markers are clipped at the edges of shapes.
- rtype:
QgsPointPatternFillSymbolLayer
- rtype:
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates a new
QgsPointPatternFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).- param element:
Returns the horizontal displacement for odd numbered rows in the pattern.
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
Returns the units for the horizontal displacement between rows in the pattern.
Returns the vertical displacement for odd numbered columns in the pattern.
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
Returns the units for the vertical displacement between rows in the pattern.
Returns the horizontal distance between rendered markers in the fill.
Returns the map unit scale for the horizontal distance between points in the pattern.
Returns the units for the horizontal distance between points in the pattern.
Returns the vertical distance between rendered markers in the fill.
Returns the map unit scale for the vertical distance between points in the pattern.
Returns the units for the vertical distance between points in the pattern.
- param context:
- rtype:
bool
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
- rtype:
QgsMapUnitScale
Returns the maximum horizontal random deviation of points in the pattern.
Returns the maximum vertical random deviation of points in the pattern.
Returns the horizontal offset values for points in the pattern.
Returns the unit scale for the horizontal offset for rows in the pattern.
Returns the units for the horizontal offset for rows in the pattern.
Returns the vertical offset values for points in the pattern.
Returns the unit scale for the vertical offset between rows in the pattern.
Returns the units for the vertical offset for rows in the pattern.
- rtype:
Qgis.RenderUnit
- rtype:
Dict[str, Any]
Returns the unit scale for the horizontal random deviation of points in the pattern.
Returns the units for the horizontal random deviation of points in the pattern.
Returns the unit scale for the vertical random deviation of points in the pattern.
Returns the units for the vertical random deviation of points in the pattern.
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
Restores older data defined properties from string map.
Returns the random number seed to use when randomly shifting points, or 0 if a truly random sequence will be used (causing points to appear in different locations with every map refresh).
Sets the marker clipping
mode
, which defines how markers are clipped at the edges of shapes.- param c:
Sets the horizontal displacement for odd numbered rows in the pattern.
Sets the map unit
scale
for the horizontal displacement between odd numbered rows in the pattern.Sets the units for the horizontal displacement between rows in the pattern.
Sets the vertical displacement for odd numbered columns in the pattern.
Sets the map unit
scale
for the vertical displacement between odd numbered columns in the pattern.Sets the units for the vertical displacement between rows in the pattern.
Sets the horizontal distance between rendered markers in the fill.
Sets the map unit
scale
for the horizontal distance between points in the pattern.Sets the
unit
for the horizontal distance between points in the pattern.Sets the vertical distance between rendered markers in the fill.
Sets the map unit
scale
for the vertical distance between points in the pattern.Sets the
unit
for the vertical distance between points in the pattern.- param scale:
Sets the maximum horizontal random
deviation
of points in the pattern.Sets the maximum vertical random
deviation
of points in the pattern.Sets the horizontal offset values for points in the pattern.
Sets the unit scale for the horizontal offset for rows in the pattern.
Sets the units for the horizontal offset between rows in the pattern.
Sets the vertical offset values for points in the pattern.
Sets the unit scale for the vertical offset for rows in the pattern.
Sets the units for the vertical offset for rows in the pattern.
- param unit:
Sets the unit
scale
for the horizontal random deviation of points in the pattern.Sets the
unit
for the horizontal random deviation of points in the pattern.Sets the unit
scale
for the vertical random deviation of points in the pattern.Sets the
unit
for the vertical random deviation of points in the pattern.Sets the random number
seed
to use when randomly shifting 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).- param symbol:
Returns
True
if the symbol layer should be rendered using the selection color from the render context.- param feature:
- param context:
- param feature:
- param context:
- rtype:
QgsSymbol
- param doc:
- rtype:
QImage
- param context:
- rtype:
bool
- applyBrushTransformFromContext()¶
- applyDataDefinedSettings(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- clipMode(self) Qgis.MarkerClipMode ¶
Returns the marker clipping mode, which defines how markers are clipped at the edges of shapes.
See also
New in version 3.24.
- Return type:
- clone(self) QgsPointPatternFillSymbolLayer ¶
- Return type:
- color(self) QColor ¶
- Return type:
QColor
- copyDataDefinedProperties(self, destLayer: QgsSymbolLayer)¶
Copies all data defined properties of this layer to another symbol layer.
- Parameters:
destLayer – destination layer
- copyPaintEffect(self, destLayer: QgsSymbolLayer)¶
Copies paint effect of this layer to another symbol layer
- Parameters:
destLayer – destination layer
New in version 2.9.
- create(properties: Dict[str, Any] = {}) QgsSymbolLayer ¶
Creates a new
QgsPointPatternFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).Caller takes ownership of the returned symbol layer.
- Parameters:
properties (Dict[str) –
- Return type:
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
- Parameters:
element (QDomElement) –
- Return type:
- displacementX(self) float ¶
Returns the horizontal displacement for odd numbered rows in the pattern.
Units are retrieved via
displacementXUnit()
.See also
See also
See also
- Return type:
float
- displacementXMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
See also
See also
- Return type:
- displacementXUnit(self) Qgis.RenderUnit ¶
Returns the units for the horizontal displacement between rows in the pattern.
See also
See also
- Return type:
- displacementY(self) float ¶
Returns the vertical displacement for odd numbered columns in the pattern.
Units are retrieved via
displacementYUnit()
.See also
See also
See also
- Return type:
float
- displacementYMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
See also
See also
- Return type:
- displacementYUnit(self) Qgis.RenderUnit ¶
Returns the units for the vertical displacement between rows in the pattern.
See also
See also
- Return type:
- distanceX(self) float ¶
Returns the horizontal distance between rendered markers in the fill.
Units are retrieved via
distanceXUnit()
.See also
See also
See also
- Return type:
float
- distanceXMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the horizontal distance between points in the pattern.
See also
See also
- Return type:
- distanceXUnit(self) Qgis.RenderUnit ¶
Returns the units for the horizontal distance between points in the pattern.
See also
See also
- Return type:
- distanceY(self) float ¶
Returns the vertical distance between rendered markers in the fill.
Units are retrieved via
distanceYUnit()
.See also
See also
See also
- Return type:
float
- distanceYMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the vertical distance between points in the pattern.
See also
See also
- Return type:
- distanceYUnit(self) Qgis.RenderUnit ¶
Returns the units for the vertical distance between points in the pattern.
See also
See also
- Return type:
- estimateMaxBleed(self, context: QgsRenderContext) float ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
float
- hasDataDefinedProperties(self) bool ¶
- Return type:
bool
- installMasks(self, context: QgsRenderContext, recursive: bool)¶
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- layerType(self) str ¶
- Return type:
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- maximumRandomDeviationX(self) float ¶
Returns the maximum horizontal random deviation of points in the pattern.
Units are retrieved via
maximumRandomDeviationXUnit()
.See also
See also
New in version 3.24.
- Return type:
float
- maximumRandomDeviationY(self) float ¶
Returns the maximum vertical random deviation of points in the pattern.
Units are retrieved via
maximumRandomDeviationYUnit()
.See also
See also
New in version 3.24.
- Return type:
float
- offsetX(self) float ¶
Returns the horizontal offset values for points in the pattern.
See also
See also
New in version 3.8.
- Return type:
float
- offsetXMapUnitScale(self) QgsMapUnitScale ¶
Returns the unit scale for the horizontal offset for rows in the pattern.
See also
See also
New in version 3.8.
- Return type:
- offsetXUnit(self) Qgis.RenderUnit ¶
Returns the units for the horizontal offset for rows in the pattern.
See also
See also
New in version 3.8.
- Return type:
- offsetY(self) float ¶
Returns the vertical offset values for points in the pattern.
See also
See also
New in version 3.8.
- Return type:
float
- offsetYMapUnitScale(self) QgsMapUnitScale ¶
Returns the unit scale for the vertical offset between rows in the pattern.
See also
See also
New in version 3.8.
- Return type:
- offsetYUnit(self) Qgis.RenderUnit ¶
Returns the units for the vertical offset for rows in the pattern.
See also
See also
New in version 3.8.
- Return type:
- outputUnit(self) Qgis.RenderUnit ¶
- Return type:
- properties(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- randomDeviationXMapUnitScale(self) QgsMapUnitScale ¶
Returns the unit scale for the horizontal random deviation of points in the pattern.
See also
See also
New in version 3.24.
- Return type:
- randomDeviationXUnit(self) Qgis.RenderUnit ¶
Returns the units for the horizontal random deviation of points in the pattern.
See also
See also
New in version 3.24.
- Return type:
- randomDeviationYMapUnitScale(self) QgsMapUnitScale ¶
Returns the unit scale for the vertical random deviation of points in the pattern.
See also
See also
New in version 3.24.
- Return type:
- randomDeviationYUnit(self) Qgis.RenderUnit ¶
Returns the units for the vertical random deviation of points in the pattern.
See also
See also
New in version 3.24.
- Return type:
- removeMasks(self, context: QgsRenderContext, recursive: bool)¶
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶
- Parameters:
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
New in version 3.0.
- seed(self) int ¶
Returns the random number seed to use when randomly shifting points, or 0 if a truly random sequence will be used (causing points to appear in different locations with every map refresh).
See also
New in version 3.24.
- Return type:
int
- setClipMode(self, mode: Qgis.MarkerClipMode)¶
Sets the marker clipping
mode
, which defines how markers are clipped at the edges of shapes.See also
New in version 3.24.
- Parameters:
mode (Qgis.MarkerClipMode) –
- setColor(self, c: QColor | Qt.GlobalColor | QGradient)¶
- Parameters:
c (Union[QColor) –
- setDisplacementX(self, d: float)¶
Sets the horizontal displacement for odd numbered rows in the pattern.
Units are set via
setDisplacementXUnit()
.See also
See also
See also
- Parameters:
d (float) –
- setDisplacementXMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the horizontal displacement between odd numbered rows in the pattern.See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setDisplacementXUnit(self, unit: Qgis.RenderUnit)¶
Sets the units for the horizontal displacement between rows in the pattern.
- Parameters:
unit (Qgis.RenderUnit) – displacement units
See also
See also
- setDisplacementY(self, d: float)¶
Sets the vertical displacement for odd numbered columns in the pattern.
Units are set via
setDisplacementYUnit()
.See also
See also
See also
- Parameters:
d (float) –
- setDisplacementYMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the vertical displacement between odd numbered columns in the pattern.See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setDisplacementYUnit(self, unit: Qgis.RenderUnit)¶
Sets the units for the vertical displacement between rows in the pattern.
- Parameters:
unit (Qgis.RenderUnit) – displacement units
See also
See also
- setDistanceX(self, d: float)¶
Sets the horizontal distance between rendered markers in the fill.
Units are set via
setDistanceXUnit()
.See also
See also
See also
- Parameters:
d (float) –
- setDistanceXMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the horizontal distance between points in the pattern.See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setDistanceXUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the horizontal distance between points in the pattern.- Parameters:
unit (Qgis.RenderUnit) – distance units
See also
See also
- setDistanceY(self, d: float)¶
Sets the vertical distance between rendered markers in the fill.
Units are set via
setDistanceYUnit()
.See also
See also
See also
- Parameters:
d (float) –
- setDistanceYMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the vertical distance between points in the pattern.See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setDistanceYUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the vertical distance between points in the pattern.- Parameters:
unit (Qgis.RenderUnit) – distance units
See also
See also
- setMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters:
scale (QgsMapUnitScale) –
- setMaximumRandomDeviationX(self, deviation: float)¶
Sets the maximum horizontal random
deviation
of points in the pattern.Units are set via
setMaximumRandomDeviationXUnit()
.See also
See also
New in version 3.24.
- Parameters:
deviation (float) –
- setMaximumRandomDeviationY(self, deviation: float)¶
Sets the maximum vertical random
deviation
of points in the pattern.Units are set via
setMaximumRandomDeviationYUnit()
.See also
See also
New in version 3.24.
- Parameters:
deviation (float) –
- setOffsetX(self, offset: float)¶
Sets the horizontal offset values for points in the pattern.
- Parameters:
offset (float) – offset value
See also
See also
New in version 3.8.
- setOffsetXMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the unit scale for the horizontal offset for rows in the pattern.
- Parameters:
scale (QgsMapUnitScale) – offset unit scale
See also
See also
New in version 3.8.
- setOffsetXUnit(self, unit: Qgis.RenderUnit)¶
Sets the units for the horizontal offset between rows in the pattern.
- Parameters:
unit (Qgis.RenderUnit) – offset units
See also
See also
New in version 3.8.
- setOffsetY(self, offset: float)¶
Sets the vertical offset values for points in the pattern.
- Parameters:
offset (float) – offset value
See also
See also
New in version 3.8.
- setOffsetYMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the unit scale for the vertical offset for rows in the pattern.
- Parameters:
scale (QgsMapUnitScale) – offset unit scale
See also
See also
New in version 3.8.
- setOffsetYUnit(self, unit: Qgis.RenderUnit)¶
Sets the units for the vertical offset for rows in the pattern.
- Parameters:
unit (Qgis.RenderUnit) – offset units
See also
See also
New in version 3.8.
- setOutputUnit(self, unit: Qgis.RenderUnit)¶
- Parameters:
unit (Qgis.RenderUnit) –
- setRandomDeviationXMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the unit
scale
for the horizontal random deviation of points in the pattern.See also
See also
New in version 3.24.
- Parameters:
scale (QgsMapUnitScale) –
- setRandomDeviationXUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the horizontal random deviation of points in the pattern.See also
See also
New in version 3.24.
- Parameters:
unit (Qgis.RenderUnit) –
- setRandomDeviationYMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the unit
scale
for the vertical random deviation of points in the pattern.See also
See also
New in version 3.24.
- Parameters:
scale (QgsMapUnitScale) –
- setRandomDeviationYUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the vertical random deviation of points in the pattern.See also
See also
New in version 3.24.
- Parameters:
unit (Qgis.RenderUnit) –
- setSeed(self, seed: int)¶
Sets the random number
seed
to use when randomly shifting 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).See also
New in version 3.24.
- Parameters:
seed (int) –
- shouldRenderUsingSelectionColor(self, context: QgsSymbolRenderContext) bool ¶
Returns
True
if the symbol layer should be rendered using the selection color from the render context.New in version 3.34.
- startFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])¶
- Parameters:
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
- toTiledPatternImage(self) QImage ¶
- Return type:
QImage
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
Set[str]
- usesMapUnits(self) bool ¶
- Return type:
bool