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
- rtype
str
- rtype
QgsMapUnitScale
Returns the line opacity.
- rtype
QgsUnitTypes.RenderUnit
Returns the raster image path.
- rtype
Dict[str, Any]
- 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
- 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) QgsUnitTypes.RenderUnit ¶
- Return type
- properties(self) Dict[str, Any] ¶
- Return type
Dict[str, Any]
- renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
- Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
- renderPolylineUsingBrush(self, points: QPolygonF, context: QgsSymbolRenderContext, brush: Union[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: QgsUnitTypes.RenderUnit)¶
- Parameters
unit (QgsUnitTypes.RenderUnit) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –
- usesMapUnits(self) bool ¶
- Return type
bool