Class: QgsMarkerLineSymbolLayer¶
- class qgis.core.QgsMarkerLineSymbolLayer¶
Bases:
QgsTemplatedLineSymbolLayerBase
Line symbol layer type which draws repeating marker symbols along a line feature.
QgsMarkerLineSymbolLayer(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL) Constructor for
QgsMarkerLineSymbolLayer
. Creates a marker line with a default marker symbol, placed at the specifiedinterval
(in millimeters).The
rotateMarker
argument specifies whether individual marker symbols should be rotated to match the line segment alignment.Methods
- rtype:
QgsMarkerLineSymbolLayer
- rtype:
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Copies all common properties of this layer to another templated symbol layer.
Creates a new
QgsMarkerLineSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsMarkerLineSymbolLayer.properties()
).Creates a new
QgsMarkerLineSymbolLayer
from an SLD XML DOMelement
.- param context:
- rtype:
bool
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
- param point:
Restores older data defined properties from string map.
Shall the marker be rotated.
- param color:
Sets all common symbol properties in the
destLayer
, using the settings serialized in theproperties
map.- param key:
- param unit:
Shall the marker be rotated.
- param symbol:
- param angle:
- param angle:
- param width:
- param context:
- param context:
- rtype:
QgsSymbol
- rtype:
float
- param doc:
- param context:
- rtype:
bool
- rtype:
float
- clone(self) QgsMarkerLineSymbolLayer ¶
- 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.
- copyTemplateSymbolProperties(self, destLayer: QgsTemplatedLineSymbolLayerBase)¶
Copies all common properties of this layer to another templated symbol layer.
- create(properties: Dict[str, Any] = {}) QgsSymbolLayer ¶
Creates a new
QgsMarkerLineSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsMarkerLineSymbolLayer.properties()
).- Parameters:
properties (Dict[str) –
- Return type:
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
Creates a new
QgsMarkerLineSymbolLayer
from an SLD XML DOMelement
.- Parameters:
element (QDomElement) –
- Return type:
- estimateMaxBleed(self, context: QgsRenderContext) float ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
float
- hasDataDefinedProperties(self) bool ¶
- Return type:
bool
- 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
- 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) –
- renderSymbol(self, point: QPointF | QPoint, feature: QgsFeature, context: QgsRenderContext, layer: int = -1, selected: bool = False)¶
- Parameters:
point (Union[QPointF) –
feature (QgsFeature) –
context (QgsRenderContext) –
layer (int = -1) –
selected (bool = False) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
New in version 3.0.
- rotateMarker(self) bool ¶
Shall the marker be rotated.
- Return type:
bool
- Returns:
True
if the marker should be rotated.
Deprecated since version Use:
rotateSymbols()
instead.
- setColor(self, color: QColor | Qt.GlobalColor | QGradient)¶
- Parameters:
color (Union[QColor) –
- setCommonProperties(destLayer: QgsTemplatedLineSymbolLayerBase, properties: Dict[str, Any])¶
Sets all common symbol properties in the
destLayer
, using the settings serialized in theproperties
map.
- setDataDefinedProperty(self, key: QgsSymbolLayer.Property, property: QgsProperty)¶
- Parameters:
key (QgsSymbolLayer.Property) –
property (QgsProperty) –
- setOutputUnit(self, unit: Qgis.RenderUnit)¶
- Parameters:
unit (Qgis.RenderUnit) –
- setRotateMarker(self, rotate: bool)¶
Shall the marker be rotated.
Deprecated since version Use:
setRotateSymbols()
instead.- Parameters:
rotate (bool) –
- setSymbolAngle(self, angle: float)¶
- Parameters:
angle (float) –
- setSymbolLineAngle(self, angle: float)¶
- Parameters:
angle (float) –
- setWidth(self, width: float)¶
- Parameters:
width (float) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- symbolAngle(self) float ¶
- Return type:
float
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])¶
- Parameters:
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
Set[str]
- usesMapUnits(self) bool ¶
- Return type:
bool
- width(self) float ¶
- width(self, context: QgsRenderContext) float
- Return type:
float