Subgroup: Raster
Class: QgsRasterFillSymbolLayer¶
-
class
qgis.core.
QgsRasterFillSymbolLayer
¶ Bases:
qgis._core.QgsImageFillSymbolLayer
A class for filling symbols with a repeated raster image.New in version 2.7: Methods
applyDataDefinedSettings
Path to the image file clone
coordinateMode
Coordinate mode for fill. copyDataDefinedProperties
copyPaintEffect
create
estimateMaxBleed
imageFilePath
The path to the raster image used for the fill. layerType
offset
Returns the offset for the fill. offsetMapUnitScale
Returns the map unit scale for the fill’s offset. offsetUnit
Returns the units for the fill’s offset. opacity
Returns the opacity for the raster image used in the fill. properties
renderPolygon
resolvePaths
Turns relative paths in properties map to absolute when reading and vice versa when writing. restoreOldDataDefinedProperties
setCoordinateMode
Set the coordinate mode for fill. setImageFilePath
Sets the path to the raster image used for the fill. setOffset
Sets the offset for the fill. setOffsetMapUnitScale
Sets the map unit scale for the fill’s offset. setOffsetUnit
Sets the units for the fill’s offset. setOpacity
Sets the opacity
for the raster image used in the fill.setSubSymbol
setWidth
Sets the width for scaling the image used in the fill. setWidthMapUnitScale
Sets the map unit scale for the image’s width. setWidthUnit
Sets the units for the image’s width. startRender
stopRender
subSymbol
width
Returns the width used for scaling the image used in the fill. widthMapUnitScale
Returns the map unit scale for the image’s width. widthUnit
Returns the units for the image’s width. Signals
Attributes
Feature
Viewport
-
Feature
= 0¶
-
class
FillCoordinateMode
¶ Bases:
int
-
Viewport
= 1¶
-
applyDataDefinedSettings
(self, context: QgsSymbolRenderContext)¶ Path to the image file
-
clone
(self) → QgsRasterFillSymbolLayer¶
-
coordinateMode
(self) → QgsRasterFillSymbolLayer.FillCoordinateMode¶ Coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature.
Returns: coordinate mode See also
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
create
(properties: Dict[str, str] = {}) → QgsSymbolLayer¶
-
estimateMaxBleed
(self, context: QgsRenderContext) → float¶
-
imageFilePath
(self) → str¶ The path to the raster image used for the fill.
Returns: path to image file See also
-
layerType
(self) → str¶
-
offset
(self) → QPointF¶ Returns the offset for the fill.
Returns: offset for fill See also
See also
See also
-
offsetMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale for the fill’s offset.
Returns: map unit scale for offset See also
See also
See also
-
offsetUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the fill’s offset.
Returns: units for offset See also
See also
See also
-
opacity
(self) → float¶ Returns the opacity for the raster image used in the fill.
Returns: opacity value between 0 (fully transparent) and 1 (fully opaque) See also
-
properties
(self) → Dict[str, str]¶
-
renderPolygon
(self, 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.
-
restoreOldDataDefinedProperties
()¶
-
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 – coordinate mode See also
-
setImageFilePath
(self, imagePath: str)¶ Sets the path to the raster image used for the fill.
Parameters: imagePath – path to image file See also
-
setOffset
(self, offset: Union[QPointF, QPoint])¶ Sets the offset for the fill.
Parameters: offset – 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 – 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 – 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 – opacity value between 0 (fully transparent) and 1 (fully opaque) See also
-
setSubSymbol
(self, symbol: QgsSymbol) → bool¶
-
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 – 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 – 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 – units for width See also
See also
See also
-
startRender
(self, context: QgsSymbolRenderContext)¶
-
stopRender
(self, context: QgsSymbolRenderContext)¶
-
subSymbol
(self) → QgsSymbol¶
-
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.
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.
Returns: map unit scale for width See also
See also
See also
-
widthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the image’s width.
Returns: units for width See also
See also
See also
-