Class: QgsRasterFillSymbolLayer¶
A class for filling symbols with a repeated raster image.
Class Hierarchy¶
Base classes¶
Base class for polygon renderers generating texture images  | 
|
Abstract base class for fill symbol layers.  | 
|
Constructor for QgsSymbolLayer.  | 
Enums
alias of   | 
Methods
Coordinate mode for fill.  | 
|
Returns the height used for scaling the image used in the fill.  | 
|
The path to the raster image used for the fill.  | 
|
Returns the offset for the fill.  | 
|
Returns the map unit scale for the fill's offset.  | 
|
Returns the units for the fill's offset.  | 
|
Returns the opacity for the raster image used in the fill.  | 
|
Set the coordinate mode for fill.  | 
|
Sets the height for scaling the image.  | 
|
Sets the path to the raster image used for the fill.  | 
|
Sets the offset for the fill.  | 
|
Sets the map unit scale for the fill's offset.  | 
|
Sets the units for the fill's offset.  | 
|
Sets the opacity for the raster image used in the fill.  | 
|
Sets the map unit scale for the image's width and height.  | 
|
Sets the unit for the image's width and height.  | 
|
Sets the width for scaling the image used in the fill.  | 
|
Sets the map unit scale for the image's width.  | 
|
Sets the unit for the image's width.  | 
|
Returns the map unit scale for the image's width and height.  | 
|
Returns the units for the image's width and height.  | 
|
Returns the width used for scaling the image used in the fill.  | 
|
Returns the map unit scale for the image's width.  | 
|
Returns the units for the image's width.  | 
Static Methods
Creates a new   | 
|
Creates a new   | 
|
Turns relative paths in properties map to absolute when reading and vice versa when writing.  | 
- class qgis.core.QgsRasterFillSymbolLayer[source]¶
 Bases:
QgsImageFillSymbolLayer- __init__(imageFilePath: str | None = '')
 Constructor for QgsRasterFillSymbolLayer, using a raster fill from the specified
imageFilePath.- Parameters:
 imageFilePath (Optional[str] = '')
- FillCoordinateMode¶
 alias of
SymbolCoordinateReference
- applyBrushTransformFromContext(self, context: QgsSymbolRenderContext | None = None) bool[source]¶
 - Parameters:
 context (Optional[QgsSymbolRenderContext] = None)
- Return type:
 bool
- applyDataDefinedSettings(self, context: QgsSymbolRenderContext)[source]¶
 - Parameters:
 context (QgsSymbolRenderContext)
- coordinateMode(self) Qgis.SymbolCoordinateReference[source]¶
 Coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature.
- Return type:
 - Returns:
 coordinate mode
See also
- static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None[source]¶
 Creates a new
QgsRasterFillSymbolLayerfrom apropertiesmap. The caller takes ownership of the returned object.- Parameters:
 properties (Dict[str, Any] = {})
- Return type:
 Optional[QgsSymbolLayer]
- static createFromSld(element: QDomElement) QgsSymbolLayer | None[source]¶
 Creates a new
QgsRasterFillSymbolLayerfrom a SLDelement. The caller takes ownership of the returned object.Added in version 3.30.
- Parameters:
 element (QDomElement)
- Return type:
 Optional[QgsSymbolLayer]
- height(self) float[source]¶
 Returns the height used for scaling the image used in the fill.
If the height is 0 then the height will be calculated automatically based on the image’s
width().See also
See also
Added in version 3.36.
- Return type:
 float
- imageFilePath(self) str[source]¶
 The path to the raster image used for the fill.
- Return type:
 str
- Returns:
 path to image file
See also
- offset(self) QPointF[source]¶
 Returns the offset for the fill.
- Return type:
 QPointF
- Returns:
 offset for fill
See also
See also
See also
- offsetMapUnitScale(self) QgsMapUnitScale¶
 Returns the map unit scale for the fill’s offset.
- Return type:
 - Returns:
 map unit scale for offset
See also
See also
See also
- offsetUnit(self) Qgis.RenderUnit[source]¶
 Returns the units for the fill’s offset.
- Return type:
 - Returns:
 units for offset
See also
See also
See also
- opacity(self) float[source]¶
 Returns the opacity for the raster image used in the fill.
- Return type:
 float
- Returns:
 opacity value between 0 (fully transparent) and 1 (fully opaque)
See also
- static resolvePaths(properties: Dict[str, Any], pathResolver: QgsPathResolver, saving: bool)[source]¶
 Turns relative paths in properties map to absolute when reading and vice versa when writing. Used internally when reading/writing symbols.
- Parameters:
 properties (Dict[str, Any])
pathResolver (QgsPathResolver)
saving (bool)
- setCoordinateMode(self, mode: Qgis.SymbolCoordinateReference)[source]¶
 Set the coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature.
- Parameters:
 mode (Qgis.SymbolCoordinateReference) – coordinate mode
See also
- setHeight(self, height: float)[source]¶
 Sets the
heightfor scaling the image.If
heightis 0 then the height will be calculated automatically based on the image’swidth().See also
See also
See also
Added in version 3.36.
- Parameters:
 height (float)
- setImageFilePath(self, imagePath: str | None)[source]¶
 Sets the path to the raster image used for the fill.
- Parameters:
 imagePath (Optional[str]) – path to image file
See also
- setOffset(self, offset: QPointF | QPoint)[source]¶
 Sets the offset for the fill.
- Parameters:
 offset (Union[QPointF, QPoint]) – offset for fill
See also
See also
See also
- setOffsetMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
 Sets the map unit scale for the fill’s offset.
- Parameters:
 scale (QgsMapUnitScale) – map unit scale for offset
See also
See also
See also
- setOffsetUnit(self, unit: Qgis.RenderUnit)[source]¶
 Sets the units for the fill’s offset.
- Parameters:
 unit (Qgis.RenderUnit) – units for offset
See also
See also
See also
- setOpacity(self, opacity: float)[source]¶
 Sets the
opacityfor the raster image used in the fill.- Parameters:
 opacity (float) – opacity value between 0 (fully transparent) and 1 (fully opaque)
See also
- setSizeMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
 Sets the map unit
scalefor the image’s width and height.See also
See also
See also
See also
Added in version 3.36.
- Parameters:
 scale (QgsMapUnitScale)
- setSizeUnit(self, unit: Qgis.RenderUnit)[source]¶
 Sets the
unitfor the image’s width and height.See also
See also
See also
Added in version 3.36.
- Parameters:
 unit (Qgis.RenderUnit)
- setWidth(self, width: float)[source]¶
 Sets the
widthfor scaling the image used in the fill.If
widthis 0 then the width will be calculated automatically based on the image’sheight().See also
See also
See also
See also
See also
- Parameters:
 width (float)
- setWidthMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
 Sets the map unit
scalefor the image’s width.See also
See also
See also
Deprecated since version 3.40: Use
setSizeMapUnitScale()instead.- Parameters:
 scale (QgsMapUnitScale)
- setWidthUnit(self, unit: Qgis.RenderUnit)[source]¶
 Sets the
unitfor the image’s width.See also
See also
See also
Deprecated since version 3.40: Use
setSizeUnit()instead.- Parameters:
 unit (Qgis.RenderUnit)
- sizeMapUnitScale(self) QgsMapUnitScale¶
 Returns the map unit scale for the image’s width and height.
See also
See also
See also
See also
Added in version 3.36.
- Return type:
 
- sizeUnit(self) Qgis.RenderUnit[source]¶
 Returns the units for the image’s width and height.
See also
See also
See also
See also
Added in version 3.36.
- Return type:
 
- width(self) float[source]¶
 Returns the width used for scaling the image used in the fill.
If the width is 0 then the width will be calculated automatically based on the image’s
height().See also
See also
See also
See also
- Return type:
 float
- widthMapUnitScale(self) QgsMapUnitScale¶
 Returns the map unit scale for the image’s width.
See also
See also
See also
Deprecated since version 3.40: Use
sizeMapUnitScale()instead.- Return type:
 
- widthUnit(self) Qgis.RenderUnit[source]¶
 Returns the units for the image’s width.
See also
See also
See also
Deprecated since version 3.40: Use
sizeUnit()instead.- Return type: