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

angle
applyDataDefinedSettings Path to the image file
clone
color The fill color.
coordinateMode Coordinate mode for fill.
copyDataDefinedProperties
copyPaintEffect
create
dataDefinedProperties Returns a reference to the symbol layer’s property collection, used for data defined overrides.
drawPreviewIcon
dxfAngle get angle
dxfBrushColor get brush/fill color
dxfBrushStyle get brush/fill style
dxfColor
dxfCustomDashPattern get dash pattern
dxfOffset get offset
dxfPenStyle
dxfWidth
enabled Returns true if symbol layer is enabled and will be drawn.
estimateMaxBleed
fillColor Get fill color.
imageFilePath The path to the raster image used for the fill.
isCompatibleWithSymbol Returns if the layer can be used below the specified symbol
isLocked
layerType
mapUnitScale
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.
ogrFeatureStyle
opacity Returns the opacity for the raster image used in the fill.
outputUnit
paintEffect Returns the current paint effect for the layer.
prepareExpressions Prepares all data defined property expressions for evaluation.
properties
propertyDefinitions Returns the symbol layer property definitions.
renderPolygon
renderingPass
restoreOldDataDefinedProperties
setAngle
setColor The fill color.
setCoordinateMode Set the coordinate mode for fill.
setDataDefinedProperties Sets the symbol layer’s property collection, used for data defined overrides.
setDataDefinedProperty Sets a data defined property for the layer.
setEnabled Sets whether symbol layer is enabled and should be drawn.
setFillColor Set fill color.
setImageFilePath Sets the path to the raster image used for the fill.
setLocked
setMapUnitScale
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.
setOutputUnit
setPaintEffect Sets the current paint effect for the layer.
setRenderingPass
setStrokeColor Set stroke color.
setStrokeWidthMapUnitScale
setStrokeWidthUnit Sets the units for the symbol’s stroke width.
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
strokeColor Get stroke color.
strokeWidthMapUnitScale
strokeWidthUnit Returns the units for the symbol’s stroke width.
subSymbol
toSld
type
usedAttributes
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.
writeDxf write as DXF

Attributes

Feature
PropertyAngle
PropertyArrowHeadLength
PropertyArrowHeadThickness
PropertyArrowHeadType
PropertyArrowStartWidth
PropertyArrowType
PropertyArrowWidth
PropertyBlurRadius
PropertyCapStyle
PropertyCharacter
PropertyCoordinateMode
PropertyCustomDash
PropertyDisplacementX
PropertyDisplacementY
PropertyDistanceX
PropertyDistanceY
PropertyFile
PropertyFillColor
PropertyFillStyle
PropertyGradientReference1IsCentroid
PropertyGradientReference1X
PropertyGradientReference1Y
PropertyGradientReference2IsCentroid
PropertyGradientReference2X
PropertyGradientReference2Y
PropertyGradientSpread
PropertyGradientType
PropertyHeight
PropertyHorizontalAnchor
PropertyInterval
PropertyJoinStyle
PropertyLayerEnabled
PropertyLineAngle
PropertyLineDistance
PropertyName
PropertyOffset
PropertyOffsetAlongLine
PropertyOpacity
PropertyPlacement
PropertyPreserveAspectRatio
PropertySecondaryColor
PropertyShapeburstIgnoreRings
PropertyShapeburstMaxDistance
PropertyShapeburstUseWholeShape
PropertySize
PropertyStrokeColor
PropertyStrokeStyle
PropertyStrokeWidth
PropertyVerticalAnchor
PropertyWidth
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
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
layerType(self) → str
offset(self) → QPointF

Returns the offset for the fill.

Returns:offset for fill

See also

setOffset()

See also

offsetUnit()

offsetMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the fill’s offset.

Returns:map unit scale for offset

See also

offset()

See also

offsetUnit()

offsetUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the fill’s offset.

Returns:units for offset

See also

setOffsetUnit()

See also

offset()

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

setOpacity()

properties(self) → Dict[str, str]
renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
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

coordinateMode()

setImageFilePath(self, imagePath: str)

Sets the path to the raster image used for the fill.

Parameters:imagePath – path to image file

See also

imageFilePath()

setOffset(self, offset: Union[QPointF, QPoint])

Sets the offset for the fill.

Parameters:offset – offset for fill

See also

offset()

See also

setOffsetUnit()

setOffsetMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the fill’s offset.

Parameters:scale – map unit scale for offset

See also

setOffset()

See also

setOffsetUnit()

setOffsetUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the units for the fill’s offset.

Parameters:unit – units for offset

See also

offsetUnit()

See also

setOffset()

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

opacity()

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

width()

See also

setWidthUnit()

setWidthMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the image’s width.

Parameters:scale – map unit scale for width

See also

setWidth()

See also

setWidthUnit()

setWidthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the units for the image’s width.

Parameters:unit – units for width

See also

widthUnit()

See also

setWidth()

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

setWidth()

See also

widthUnit()

widthMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the image’s width.

Returns:map unit scale for width

See also

width()

See also

widthUnit()

widthUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the image’s width.

Returns:units for width

See also

setWidthUnit()

See also

width()