Class: QgsRasterFillSymbolLayer¶
-
class
qgis.core.
QgsRasterFillSymbolLayer
(imageFilePath: str = '')¶ Bases:
QgsImageFillSymbolLayer
Constructor for
QgsRasterFillSymbolLayer
, using a raster fill from the specifiedimageFilePath
.A class for filling symbols with a repeated raster image.
New in version 2.7.
- Parameters
imageFilePath –
-
Feature
= 0¶
-
class
FillCoordinateMode
¶ Bases:
int
-
Viewport
= 1¶
-
applyDataDefinedSettings
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
clone
(self) → QgsRasterFillSymbolLayer¶ - Return type
-
coordinateMode
(self) → QgsRasterFillSymbolLayer.FillCoordinateMode¶ 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
-
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, str] = {}) → QgsSymbolLayer¶ Creates a new
QgsRasterFillSymbolLayer
from aproperties
map. The caller takes ownership of the returned object.- Parameters
properties (Dict[str) –
- Return type
-
estimateMaxBleed
(self, context: QgsRenderContext) → float¶ - Parameters
context (QgsRenderContext) –
- Return type
float
-
imageFilePath
(self) → str¶ The path to the raster image used for the fill.
- Return type
str
- Returns
path to image file
See also
-
layerType
(self) → str¶ - Return type
str
-
offset
(self) → QPointF¶ 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) → QgsUnitTypes.RenderUnit¶ Returns the units for the fill’s offset.
- Return type
- Returns
units for offset
See also
See also
See also
-
opacity
(self) → float¶ 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
-
properties
(self) → Dict[str, str]¶ - Return type
Dict[str, str]
-
renderPolygon
(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
-
resolvePaths
(properties: Dict[str, str], pathResolver: QgsPathResolver, saving: bool)¶ Turns relative paths in properties map to absolute when reading and vice versa when writing. Used internally when reading/writing symbols.
New in version 3.0.
- Parameters
properties (Dict[str) –
pathResolver (QgsPathResolver) –
saving (bool) –
-
restoreOldDataDefinedProperties
(self, stringMap: Dict[str, str])¶ Restores older data defined properties from string map.
New in version 3.0.
-
setCoordinateMode
(self, mode: QgsRasterFillSymbolLayer.FillCoordinateMode)¶ Set the coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature.
- Parameters
mode (QgsRasterFillSymbolLayer.FillCoordinateMode) – coordinate mode
See also
-
setImageFilePath
(self, imagePath: str)¶ Sets the path to the raster image used for the fill.
- Parameters
imagePath (str) – path to image file
See also
-
setOffset
(self, offset: Union[QPointF, QPoint])¶ Sets the offset for the fill.
- Parameters
offset (Union[QPointF) – offset for fill
See also
See also
See also
-
setOffsetMapUnitScale
(self, scale: QgsMapUnitScale)¶ 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: QgsUnitTypes.RenderUnit)¶ Sets the units for the fill’s offset.
- Parameters
unit (QgsUnitTypes.RenderUnit) – units for offset
See also
See also
See also
-
setOpacity
(self, opacity: float)¶ Sets the
opacity
for the raster image used in the fill.- Parameters
opacity (float) – opacity value between 0 (fully transparent) and 1 (fully opaque)
See also
-
setWidth
(self, width: float)¶ Sets the width for scaling the image used in the fill. The image’s height will also be scaled to maintain the image’s aspect ratio.
- Parameters
width (float) – width for scaling the image
See also
See also
See also
-
setWidthMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale for the image’s width.
- Parameters
scale (QgsMapUnitScale) – map unit scale for width
See also
See also
See also
-
setWidthUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the image’s width.
- Parameters
unit (QgsUnitTypes.RenderUnit) – units for width
See also
See also
See also
-
startRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
stopRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
width
(self) → float¶ Returns the width used for scaling the image used in the fill. The image’s height is scaled to maintain the image’s aspect ratio.
- Return type
float
- Returns
width used for scaling the image
See also
See also
See also
-
widthMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale for the image’s width.
- Return type
- Returns
map unit scale for width
See also
See also
See also
-
widthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the image’s width.
- Return type
- Returns
units for width
See also
See also
See also