Subgroup: Marker
Class: QgsMarkerLineSymbolLayer¶
-
class
qgis.core.
QgsMarkerLineSymbolLayer
(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL)¶ Bases:
qgis._core.QgsLineSymbolLayer
Methods
clone
color
copyDataDefinedProperties
copyPaintEffect
create
Create a new MarkerLineSymbolLayerV2 createFromSld
Create a new MarkerLineSymbolLayerV2 from SLD dataDefinedProperties
Returns a reference to the symbol layer’s property collection, used for data defined overrides. drawPreviewIcon
dxfAngle
get angle dxfBrushColor
get brush/fill color dxfBrushStyle
get brush/fill style dxfColor
get color dxfCustomDashPattern
get dash pattern dxfOffset
get offset dxfPenStyle
get pen style dxfWidth
enabled
Returns true if symbol layer is enabled and will be drawn. estimateMaxBleed
fillColor
Get fill color. interval
Returns the interval between individual markers. intervalMapUnitScale
intervalUnit
Returns the units for the interval between markers. isCompatibleWithSymbol
Returns if the layer can be used below the specified symbol isLocked
layerType
mapUnitScale
markerAngle
offset
offsetAlongLine
Returns the offset along the line for the marker placement. offsetAlongLineMapUnitScale
Returns the map unit scale used for calculating the offset in map units along line for markers. offsetAlongLineUnit
Returns the unit used for calculating the offset along line for markers. offsetMapUnitScale
offsetUnit
Returns the units for the line’s offset. ogrFeatureStyle
outputUnit
paintEffect
Returns the current paint effect for the layer. placement
The placement of the markers. prepareExpressions
Prepares all data defined property expressions for evaluation. properties
propertyDefinitions
Returns the symbol layer property definitions. renderPolygonStroke
renderPolyline
renderPolylineCentral
renderPolylineInterval
renderPolylineVertex
renderingPass
restoreOldDataDefinedProperties
rotateMarker
Shall the marker be rotated. setColor
setDataDefinedProperties
Sets the symbol layer’s property collection, used for data defined overrides. setDataDefinedProperty
setEnabled
Sets whether symbol layer is enabled and should be drawn. setFillColor
Set fill color. setInterval
Sets the interval between individual markers. setIntervalMapUnitScale
setIntervalUnit
Sets the units for the interval between markers. setLocked
setMapUnitScale
setOffset
setOffsetAlongLine
Sets the the offset along the line for the marker placement. setOffsetAlongLineMapUnitScale
Sets the map unit scale used for calculating the offset in map units along line for markers. setOffsetAlongLineUnit
Sets the unit used for calculating the offset along line for markers. setOffsetMapUnitScale
setOffsetUnit
Sets the units for the line’s offset. setOutputUnit
setPaintEffect
Sets the current paint effect for the layer. setPlacement
The placement of the markers. setRenderingPass
setRotateMarker
Shall the marker be rotated. setStrokeColor
Set stroke color. setSubSymbol
setWidth
setWidthMapUnitScale
setWidthUnit
Sets the units for the line’s width. startRender
stopRender
strokeColor
Get stroke color. subSymbol
toSld
type
usedAttributes
width
widthMapUnitScale
widthUnit
Returns the units for the line’s width. writeDxf
write as DXF Attributes
CentralPoint
CurvePoint
FirstVertex
Interval
LastVertex
PropertyAngle
PropertyArrowHeadLength
PropertyArrowHeadThickness
PropertyArrowHeadType
PropertyArrowStartWidth
PropertyArrowType
PropertyArrowWidth
PropertyBlurRadius
PropertyCapStyle
PropertyCharacter
PropertyCoordinateMode
PropertyCustomDash
PropertyDisplacementX
PropertyDisplacementY
PropertyDistanceX
PropertyDistanceY
PropertyFile
PropertyFillColor
PropertyFillStyle
PropertyGradientReference1IsCentroid
PropertyGradientReference1X
PropertyGradientReference1Y
PropertyGradientReference2IsCentroid
PropertyGradientReference2X
PropertyGradientReference2Y
PropertyGradientSpread
PropertyGradientType
PropertyHeight
PropertyHorizontalAnchor
PropertyInterval
PropertyJoinStyle
PropertyLayerEnabled
PropertyLineAngle
PropertyLineDistance
PropertyName
PropertyOffset
PropertyOffsetAlongLine
PropertyOpacity
PropertyPlacement
PropertyPreserveAspectRatio
PropertySecondaryColor
PropertyShapeburstIgnoreRings
PropertyShapeburstMaxDistance
PropertyShapeburstUseWholeShape
PropertySize
PropertyStrokeColor
PropertyStrokeStyle
PropertyStrokeWidth
PropertyVerticalAnchor
PropertyWidth
Vertex
-
CentralPoint
= 4¶
-
CurvePoint
= 5¶
-
FirstVertex
= 3¶
-
Interval
= 0¶
-
LastVertex
= 2¶
-
class
Placement
¶ Bases:
int
-
Vertex
= 1¶
-
clone
(self) → QgsMarkerLineSymbolLayer¶
-
color
(self) → QColor¶
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
create
(properties: Dict[str, str] = {}) → QgsSymbolLayer¶ Create a new MarkerLineSymbolLayerV2
Parameters: properties – A property map to deserialize saved information from properties() Returns: A new MarkerLineSymbolLayerV2
-
createFromSld
(element: QDomElement) → QgsSymbolLayer¶ Create a new MarkerLineSymbolLayerV2 from SLD
Parameters: element – An SLD XML DOM element Returns: A new MarkerLineSymbolLayerV2
-
estimateMaxBleed
(self, context: QgsRenderContext) → float¶
-
interval
(self) → float¶ Returns the interval between individual markers. Units are specified through intervalUnits().
See also
See also
-
intervalMapUnitScale
(self) → QgsMapUnitScale¶
-
intervalUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the interval between markers.
See also
See also
-
layerType
(self) → str¶
-
mapUnitScale
(self) → QgsMapUnitScale¶
-
markerAngle
(self, points: QPolygonF, isRing: bool, vertex: int) → float¶
-
offsetAlongLine
(self) → float¶ Returns the offset along the line for the marker placement. For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.
Returns: The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit. New in version 2.3.
See also
See also
See also
-
offsetAlongLineMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale used for calculating the offset in map units along line for markers.
Returns: Offset along line map unit scale.
-
offsetAlongLineUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the unit used for calculating the offset along line for markers.
Returns: Offset along line unit type. See also
See also
-
outputUnit
(self) → QgsUnitTypes.RenderUnit¶
-
placement
(self) → QgsMarkerLineSymbolLayer.Placement¶ The placement of the markers.
-
properties
(self) → Dict[str, str]¶
-
renderPolygonStroke
(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶
-
renderPolyline
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
-
renderPolylineCentral
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
-
renderPolylineInterval
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
-
renderPolylineVertex
(self, points: QPolygonF, context: QgsSymbolRenderContext, placement: QgsMarkerLineSymbolLayer.Placement = QgsMarkerLineSymbolLayer.Vertex)¶
-
restoreOldDataDefinedProperties
()¶
-
rotateMarker
(self) → bool¶ Shall the marker be rotated.
Returns: True if the marker should be rotated.
-
setColor
(self, color: Union[QColor, Qt.GlobalColor])¶
-
setDataDefinedProperty
(self, key: QgsSymbolLayer.Property, property: QgsProperty)¶
-
setInterval
(self, interval: float)¶ Sets the interval between individual markers.
Parameters: interval – interval size. Units are specified through setIntervalUnits() See also
See also
setIntervalUnits()
-
setIntervalMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setIntervalUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the interval between markers.
Parameters: unit – interval units See also
See also
-
setMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setOffsetAlongLine
(self, offsetAlongLine: float)¶ Sets the the offset along the line for the marker placement. For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.
Parameters: offsetAlongLine – Distance to offset markers along the line. The offset unit is set via setOffsetAlongLineUnit.
New in version 2.3.
See also
See also
See also
-
setOffsetAlongLineMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale used for calculating the offset in map units along line for markers.
Parameters: scale – Offset along line map unit scale.
-
setOffsetAlongLineUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the unit used for calculating the offset along line for markers.
Parameters: unit – Offset along line unit type. See also
See also
-
setOutputUnit
(self, unit: QgsUnitTypes.RenderUnit)¶
-
setPlacement
(self, p: QgsMarkerLineSymbolLayer.Placement)¶ The placement of the markers.
-
setRotateMarker
(self, rotate: bool)¶ Shall the marker be rotated.
-
setSubSymbol
(self, symbol: QgsSymbol) → bool¶
-
setWidth
(self, width: float)¶
-
startRender
(self, context: QgsSymbolRenderContext)¶
-
stopRender
(self, context: QgsSymbolRenderContext)¶
-
subSymbol
(self) → QgsSymbol¶
-
toSld
(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])¶
-
usedAttributes
(self, context: QgsRenderContext) → Set[str]¶
-
width
(self) → float¶
-