Class: QgsHashedLineSymbolLayer¶
Line symbol layer type which draws repeating line sections along a line feature.
Added in version 3.8.
Class Hierarchy¶
Base classes¶
Base class for templated line symbols, e.g. line symbols which draw markers or hash lines at intervals along the line feature. |
|
Abstract base class for line symbol layers. |
|
Abstract base class for symbol layers. |
Methods
Returns the angle to use when drawing the hashed lines sections, in degrees clockwise. |
|
Returns the length of hash symbols. |
|
Returns the map unit scale for the hash length. |
|
Returns the units for the length of hash symbols. |
|
Sets the angle to use when drawing the hashed lines sections, in degrees clockwise. |
|
Sets the length of hash symbols. |
|
Sets the map unit scale for the hash length. |
|
Sets the unit for the length of hash symbols. |
Static Methods
Creates a new |
- class qgis.core.QgsHashedLineSymbolLayer[source]¶
Bases:
QgsTemplatedLineSymbolLayerBase
- __init__(rotateSymbol: bool = True, interval: float = 3)
Constructor for QgsHashedLineSymbolLayer. Creates a line with a default hash symbol, placed at the specified
interval
(in millimeters).The
rotateSymbol
argument specifies whether individual hash symbols should be rotated to match the line segment alignment.- Parameters:
rotateSymbol (bool = True)
interval (float = 3)
- static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None [source]¶
Creates a new
QgsHashedLineSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsHashedLineSymbolLayer.properties()
).- Parameters:
properties (Dict[str, Any] = {})
- Return type:
Optional[QgsSymbolLayer]
- hashAngle(self) float [source]¶
Returns the angle to use when drawing the hashed lines sections, in degrees clockwise.
See also
- Return type:
float
- hashLength(self) float [source]¶
Returns the length of hash symbols. Units are specified through
hashLengthUnits()
.See also
See also
- Return type:
float
- hashLengthMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the hash length.
See also
See also
See also
- Return type:
- hashLengthUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the length of hash symbols.
See also
See also
- Return type:
- setHashAngle(self, angle: float)[source]¶
Sets the
angle
to use when drawing the hashed lines sections, in degrees clockwise.See also
- Parameters:
angle (float)
- setHashLength(self, length: float)[source]¶
Sets the
length
of hash symbols. Units are specified throughsetHashLengthUnit()
See also
See also
- Parameters:
length (float)
- setHashLengthMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the map unit
scale
for the hash length.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setHashLengthUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the length of hash symbols.See also
See also
- Parameters:
unit (Qgis.RenderUnit)