Class: QgsSimpleLineSymbolLayer

class qgis.core.QgsSimpleLineSymbolLayer(color: Union[QColor, Qt.GlobalColor] = DEFAULT_SIMPLELINE_COLOR, width: float = DEFAULT_SIMPLELINE_WIDTH, penStyle: Qt.PenStyle = DEFAULT_SIMPLELINE_PENSTYLE)

Bases: qgis._core.QgsLineSymbolLayer

Constructor for QgsSimpleLineSymbolLayer. Creates a simple line symbol in the specified color, width (in millimeters) and penStyle.

QgsSimpleLineSymbolLayer(QgsSimpleLineSymbolLayer)

A simple line symbol layer, which renders lines using a line in a variety of styles (e.g. solid, dotted, dashed).

Enums

Methods

clone

copyDataDefinedProperties

copyPaintEffect

create

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

createFromSld

Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM element.

customDashPatternMapUnitScale

Returns the map unit scale for lengths used in the custom dash pattern.

customDashPatternUnit

Returns the units for lengths used in the custom dash pattern.

customDashVector

Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while rendering a custom dash pattern.

drawInsidePolygon

Returns True if the line should only be drawn inside polygons, and any portion of the line which falls outside the polygon should be clipped away.

dxfColor

dxfCustomDashPattern

dxfOffset

dxfPenStyle

dxfWidth

estimateMaxBleed

layerType

mapUnitScale

ogrFeatureStyle

outputUnit

penCapStyle

Returns the pen cap style used to render the line (e.g.

penJoinStyle

Returns the pen join style used to render the line (e.g.

penStyle

Returns the pen style used to render the line (e.g.

properties

renderPolygonStroke

renderPolyline

restoreOldDataDefinedProperties

setCustomDashPatternMapUnitScale

Sets the map unit scale for lengths used in the custom dash pattern.

setCustomDashPatternUnit

Sets the unit for lengths used in the custom dash pattern.

setCustomDashVector

Sets the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while rendering a custom dash pattern.

setDrawInsidePolygon

Sets whether the line should only be drawn inside polygons, and any portion of the line which falls outside the polygon should be clipped away.

setMapUnitScale

setOutputUnit

setPenCapStyle

Sets the pen cap style used to render the line (e.g.

setPenJoinStyle

Sets the pen join style used to render the line (e.g.

setPenStyle

Sets the pen style used to render the line (e.g.

setUseCustomDashPattern

Sets whether the line uses a custom dash pattern.

startRender

stopRender

toSld

useCustomDashPattern

Returns True if the line uses a custom dash pattern.

Signals

Attributes

clone(self) → QgsSimpleLineSymbolLayer
copyDataDefinedProperties()
copyPaintEffect()
create(properties: Dict[str, str] = {}) → QgsSymbolLayer

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

createFromSld(element: QDomElement) → QgsSymbolLayer

Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM element.

customDashPatternMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for lengths used in the custom dash pattern.

customDashPatternUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for lengths used in the custom dash pattern.

customDashVector(self) → List[float]

Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while rendering a custom dash pattern.

Units for the vector are specified by customDashPatternUnit()

This setting is only used when useCustomDashPattern() returns True.

drawInsidePolygon(self) → bool

Returns True if the line should only be drawn inside polygons, and any portion of the line which falls outside the polygon should be clipped away.

This setting only has an effect when the line symbol is being used to render polygon rings.

dxfColor(self, context: QgsSymbolRenderContext) → QColor
dxfCustomDashPattern(self) → Tuple[List[float], QgsUnitTypes.RenderUnit]
dxfOffset(self, e: QgsDxfExport, context: QgsSymbolRenderContext) → float
dxfPenStyle(self) → Qt.PenStyle
dxfWidth(self, e: QgsDxfExport, context: QgsSymbolRenderContext) → float
estimateMaxBleed(self, context: QgsRenderContext) → float
layerType(self) → str
mapUnitScale(self) → QgsMapUnitScale
ogrFeatureStyle(self, mmScaleFactor: float, mapUnitScaleFactor: float) → str
outputUnit(self) → QgsUnitTypes.RenderUnit
penCapStyle(self) → Qt.PenCapStyle

Returns the pen cap style used to render the line (e.g. flat, square, round, etc).

See also

setPenCapStyle()

penJoinStyle(self) → Qt.PenJoinStyle

Returns the pen join style used to render the line (e.g. miter, bevel, round, etc).

penStyle(self) → Qt.PenStyle

Returns the pen style used to render the line (e.g. solid, dashed, etc).

See also

setPenStyle()

properties(self) → Dict[str, str]
renderPolygonStroke(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)
restoreOldDataDefinedProperties()
setCustomDashPatternMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for lengths used in the custom dash pattern.

setCustomDashPatternUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for lengths used in the custom dash pattern.

setCustomDashVector(self, vector: Iterable[float])

Sets the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while rendering a custom dash pattern.

Units for the vector are specified by customDashPatternUnit()

This setting is only used when useCustomDashPattern() returns True.

setDrawInsidePolygon(self, drawInsidePolygon: bool)

Sets whether the line should only be drawn inside polygons, and any portion of the line which falls outside the polygon should be clipped away.

This setting only has an effect when the line symbol is being used to render polygon rings.

setMapUnitScale(self, scale: QgsMapUnitScale)
setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
setPenCapStyle(self, style: Qt.PenCapStyle)

Sets the pen cap style used to render the line (e.g. flat, square, round, etc).

See also

penCapStyle()

setPenJoinStyle(self, style: Qt.PenJoinStyle)

Sets the pen join style used to render the line (e.g. miter, bevel, round, etc).

See also

penJoinStyle()

setPenStyle(self, style: Qt.PenStyle)

Sets the pen style used to render the line (e.g. solid, dashed, etc).

See also

penStyle()

setUseCustomDashPattern(self, b: bool)

Sets whether the line uses a custom dash pattern.

startRender(self, context: QgsSymbolRenderContext)
stopRender(self, context: QgsSymbolRenderContext)
toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])
useCustomDashPattern(self) → bool

Returns True if the line uses a custom dash pattern.