Class: QgsHashedLineSymbolLayer¶
-
class
qgis.core.
QgsHashedLineSymbolLayer
(rotateSymbol: bool = True, interval: float = 3)¶ Bases:
qgis._core.QgsTemplatedLineSymbolLayerBase
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.Line symbol layer type which draws repeating line sections along a line feature.
New in version 3.8: Enums
Methods
Creates a new QgsHashedLineSymbolLayer, using the settings serialized in the
properties
map (corresponding to the output from QgsHashedLineSymbolLayer.properties() ).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.width(self, context: QgsRenderContext) -> float
Signals
Attributes
-
clone
(self) → QgsHashedLineSymbolLayer¶
-
color
(self) → QColor¶
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
copyTemplateSymbolProperties
()¶
-
create
(properties: Dict[str, str] = {}) → QgsSymbolLayer¶ Creates a new QgsHashedLineSymbolLayer, using the settings serialized in the
properties
map (corresponding to the output from QgsHashedLineSymbolLayer.properties() ).
-
estimateMaxBleed
(self, context: QgsRenderContext) → float¶
-
hasDataDefinedProperties
(self) → bool¶
-
hashAngle
(self) → float¶ Returns the angle to use when drawing the hashed lines sections, in degrees clockwise.
See also
-
hashLength
(self) → float¶ Returns the length of hash symbols. Units are specified through hashLengthUnits().
See also
See also
-
hashLengthMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale for the hash length.
See also
See also
See also
-
hashLengthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the length of hash symbols.
See also
See also
-
layerType
(self) → str¶
-
properties
(self) → Dict[str, str]¶
-
renderSymbol
(self, point: Union[QPointF, QPoint], feature: QgsFeature, context: QgsRenderContext, layer: int = -1, selected: bool = False)¶
-
restoreOldDataDefinedProperties
()¶
-
setColor
(self, color: Union[QColor, Qt.GlobalColor])¶
-
setCommonProperties
()¶
-
setDataDefinedProperty
(self, key: QgsSymbolLayer.Property, property: QgsProperty)¶
-
setHashAngle
(self, angle: float)¶ Sets the
angle
to use when drawing the hashed lines sections, in degrees clockwise.See also
-
setHashLength
(self, length: float)¶ Sets the
length
of hash symbols. Units are specified through setHashLengthUnit()See also
See also
-
setHashLengthMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit
scale
for the hash length.See also
See also
See also
-
setHashLengthUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the
unit
for the length of hash symbols.See also
See also
-
setOutputUnit
(self, unit: QgsUnitTypes.RenderUnit)¶
-
setSubSymbol
(self, symbol: QgsSymbol) → bool¶
-
setSymbolAngle
(self, angle: float)¶
-
setSymbolLineAngle
(self, angle: float)¶
-
setWidth
(self, width: float)¶
-
startRender
(self, context: QgsSymbolRenderContext)¶
-
stopRender
(self, context: QgsSymbolRenderContext)¶
-
subSymbol
(self) → QgsSymbol¶
-
symbolAngle
(self) → float¶
-
usedAttributes
(self, context: QgsRenderContext) → Set[str]¶
-
width
(self) → float¶ width(self, context: QgsRenderContext) -> float
-