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

clone

color

copyDataDefinedProperties

copyPaintEffect

copyTemplateSymbolProperties

create

Creates a new QgsHashedLineSymbolLayer, using the settings serialized in the properties map (corresponding to the output from QgsHashedLineSymbolLayer.properties() ).

estimateMaxBleed

hasDataDefinedProperties

hashAngle

Returns the angle to use when drawing the hashed lines sections, in degrees clockwise.

hashLength

Returns the length of hash symbols.

hashLengthMapUnitScale

Returns the map unit scale for the hash length.

hashLengthUnit

Returns the units for the length of hash symbols.

layerType

properties

renderSymbol

restoreOldDataDefinedProperties

setColor

setCommonProperties

setDataDefinedProperty

setHashAngle

Sets the angle to use when drawing the hashed lines sections, in degrees clockwise.

setHashLength

Sets the length of hash symbols.

setHashLengthMapUnitScale

Sets the map unit scale for the hash length.

setHashLengthUnit

Sets the unit for the length of hash symbols.

setOutputUnit

setSubSymbol

setSymbolAngle

setSymbolLineAngle

setWidth

startRender

stopRender

subSymbol

symbolAngle

usedAttributes

width

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

setHashAngle()

hashLength(self) → float

Returns the length of hash symbols. Units are specified through hashLengthUnits().

See also

setHashLength()

See also

hashLengthUnit()

hashLengthMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the hash length.

See also

hashLengthUnit()

See also

hashLength()

hashLengthUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the length of hash symbols.

See also

hashLength()

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

hashAngle()

setHashLength(self, length: float)

Sets the length of hash symbols. Units are specified through setHashLengthUnit()

See also

hashLength()

setHashLengthMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the hash length.

See also

setHashLength()

setHashLengthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the length of hash symbols.

See also

hashLengthUnit()

See also

setHashLength()

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