Class: QgsRasterLineSymbolLayer¶
- class qgis.core.QgsRasterLineSymbolLayer¶
Bases:
QgsAbstractBrushedLineSymbolLayer
Line symbol layer type which draws line sections using a raster image file.
New in version 3.24.
QgsRasterLineSymbolLayer(path: str = ‘’) Constructor for
QgsRasterLineSymbolLayer
, with the specified raster image path.Methods
- rtype:
QgsRasterLineSymbolLayer
- 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
QgsRasterLineSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsRasterLineSymbolLayer.properties()
).- param context:
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
- rtype:
QgsMapUnitScale
Returns the line opacity.
- rtype:
Qgis.RenderUnit
Returns the raster image path.
- rtype:
Dict[str, Any]
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
Renders a polyline of
points
using the specifiedbrush
.Turns relative paths in properties map to absolute when reading and vice versa when writing.
Restores older data defined properties from string map.
- param scale:
Set the line opacity.
- param unit:
Set the raster image
path
.- param context:
- param context:
- rtype:
bool
- clone(self) QgsRasterLineSymbolLayer ¶
- 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
QgsRasterLineSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsRasterLineSymbolLayer.properties()
).- Parameters:
properties (Dict[str) –
- Return type:
- estimateMaxBleed(self, context: QgsRenderContext) float ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
float
- 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:
- opacity(self) float ¶
Returns the line opacity.
- Return type:
float
- Returns:
opacity value between 0 (fully transparent) and 1 (fully opaque)
See also
- outputUnit(self) Qgis.RenderUnit ¶
- Return type:
- properties(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- 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.
- renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
- Parameters:
points (QPolygonF) –
context (QgsSymbolRenderContext) –
- renderPolylineUsingBrush(self, points: QPolygonF, context: QgsSymbolRenderContext, brush: QBrush | QColor | Qt.GlobalColor | QGradient, patternThickness: float, patternLength: float)¶
Renders a polyline of
points
using the specifiedbrush
.
- resolvePaths(properties: Dict[str, Any], 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.
- Parameters:
properties (Dict[str) –
pathResolver (QgsPathResolver) –
saving (bool) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
New in version 3.0.
- setMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters:
scale (QgsMapUnitScale) –
- setOpacity(self, opacity: float)¶
Set the line opacity.
- Parameters:
opacity (float) – opacity value between 0 (fully transparent) and 1 (fully opaque)
See also
- setOutputUnit(self, unit: Qgis.RenderUnit)¶
- Parameters:
unit (Qgis.RenderUnit) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- usesMapUnits(self) bool ¶
- Return type:
bool