Class: QgsLinePatternFillSymbolLayer

A symbol fill consisting of repeated parallel lines.

Class Hierarchy

Inheritance diagram of qgis.core.QgsLinePatternFillSymbolLayer

Base classes

QgsImageFillSymbolLayer

Base class for fill symbol layers which fill polygons with a repeated image.

QgsFillSymbolLayer

Abstract base class for fill symbol layers.

QgsSymbolLayer

Abstract base class for symbol layers.

Methods

clipMode

Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.

distance

Returns the distance between lines in the fill pattern.

distanceMapUnitScale

Returns the map unit scale for the pattern's line distance.

distanceUnit

Returns the units for the distance between lines in the fill pattern.

lineAngle

Returns the angle for the parallel lines used to fill the symbol.

lineWidth

Returns the width of the line subsymbol used to render the parallel lines in the fill.

lineWidthMapUnitScale

Returns the map unit scale for the pattern's line width.

lineWidthUnit

Returns the units for the line's width.

offset

Returns the offset distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.

offsetMapUnitScale

Returns the map unit scale for the pattern's line offset.

offsetUnit

Returns the units for the line pattern's offset.

ogrFeatureStyleWidth

setClipMode

Sets the line clipping mode, which defines how lines are clipped at the edges of shapes.

setDistance

Sets the distance between lines in the fill pattern.

setDistanceMapUnitScale

Sets the map unit scale for the pattern's line distance.

setDistanceUnit

Sets the unit for the distance between lines in the fill pattern.

setLineAngle

Sets the angle for the parallel lines used to fill the symbol.

setLineWidth

Sets the width of the line subsymbol used to render the parallel lines in the fill.

setLineWidthMapUnitScale

Sets the map unit scale for the pattern's line width.

setLineWidthUnit

Sets the unit for the line's width.

setOffset

Sets the offset distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.

setOffsetMapUnitScale

Sets the map unit scale for the pattern's line offset.

setOffsetUnit

Sets the unit for the line pattern's offset.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsLinePatternFillSymbolLayer. See the FAQ for more details.

applyBrushTransformFromContext

applyDataDefinedSettings

Static Methods

create

Creates a new QgsLinePatternFillSymbolLayer from a properties map.

createFromSld

Creates a new QgsLinePatternFillSymbolLayer from a SLD element.

class qgis.core.QgsLinePatternFillSymbolLayer[source]

Bases: QgsImageFillSymbolLayer

virtual applyBrushTransformFromContext()
virtual applyDataDefinedSettings(self, context: QgsSymbolRenderContext)[source]
Parameters:

context (QgsSymbolRenderContext)

clipMode(self) Qgis.LineClipMode[source]

Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.

See also

setClipMode()

Added in version 3.24.

Return type:

Qgis.LineClipMode

static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None[source]

Creates a new QgsLinePatternFillSymbolLayer from a properties map. The caller takes ownership of the returned object.

Parameters:

properties (Dict[str, Any] = {})

Return type:

Optional[QgsSymbolLayer]

static createFromSld(element: QDomElement) QgsSymbolLayer | None[source]

Creates a new QgsLinePatternFillSymbolLayer from a SLD element. The caller takes ownership of the returned object.

Parameters:

element (QDomElement)

Return type:

Optional[QgsSymbolLayer]

distance(self) float[source]

Returns the distance between lines in the fill pattern. Units are retrieved by distanceUnit().

See also

setDistance()

See also

distanceUnit()

Return type:

float

distanceMapUnitScale(self) QgsMapUnitScale

Returns the map unit scale for the pattern’s line distance.

See also

distance()

See also

distanceUnit()

Return type:

QgsMapUnitScale

distanceUnit(self) Qgis.RenderUnit[source]

Returns the units for the distance between lines in the fill pattern.

See also

distance()

Return type:

Qgis.RenderUnit

lineAngle(self) float[source]

Returns the angle for the parallel lines used to fill the symbol.

Angles are in degrees, clockwise from North.

See also

setLineAngle()

Return type:

float

lineWidth(self) float[source]

Returns the width of the line subsymbol used to render the parallel lines in the fill.

See also

setLineWidth()

Return type:

float

lineWidthMapUnitScale(self) QgsMapUnitScale

Returns the map unit scale for the pattern’s line width.

See also

lineWidth()

See also

lineWidthUnit()

Return type:

QgsMapUnitScale

lineWidthUnit(self) Qgis.RenderUnit[source]

Returns the units for the line’s width.

Return type:

Qgis.RenderUnit

offset(self) float[source]

Returns the offset distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.

Units are retrieved via offsetUnit().

See also

setOffset()

See also

offsetUnit()

Return type:

float

offsetMapUnitScale(self) QgsMapUnitScale

Returns the map unit scale for the pattern’s line offset.

See also

offset()

See also

offsetUnit()

Return type:

QgsMapUnitScale

offsetUnit(self) Qgis.RenderUnit[source]

Returns the units for the line pattern’s offset.

See also

setOffsetUnit()

Return type:

Qgis.RenderUnit

ogrFeatureStyleWidth(self, widthScaleFactor: float) str[source]
Parameters:

widthScaleFactor (float)

Return type:

str

setClipMode(self, mode: Qgis.LineClipMode)[source]

Sets the line clipping mode, which defines how lines are clipped at the edges of shapes.

See also

clipMode()

Added in version 3.24.

Parameters:

mode (Qgis.LineClipMode)

setDistance(self, d: float)[source]

Sets the distance between lines in the fill pattern.

Parameters:

d (float) – distance. Units are specified by setDistanceUnit()

See also

distance()

setDistanceMapUnitScale(self, scale: QgsMapUnitScale)[source]

Sets the map unit scale for the pattern’s line distance.

See also

setDistance()

Parameters:

scale (QgsMapUnitScale)

setDistanceUnit(self, unit: Qgis.RenderUnit)[source]

Sets the unit for the distance between lines in the fill pattern.

See also

distanceUnit()

See also

setDistance()

Parameters:

unit (Qgis.RenderUnit)

setLineAngle(self, a: float)[source]

Sets the angle for the parallel lines used to fill the symbol.

Angles are in degrees, clockwise from North.

See also

lineAngle()

Parameters:

a (float)

setLineWidth(self, w: float)[source]

Sets the width of the line subsymbol used to render the parallel lines in the fill.

See also

lineWidth()

Parameters:

w (float)

setLineWidthMapUnitScale(self, scale: QgsMapUnitScale)[source]

Sets the map unit scale for the pattern’s line width.

See also

setLineWidth()

Parameters:

scale (QgsMapUnitScale)

setLineWidthUnit(self, unit: Qgis.RenderUnit)[source]

Sets the unit for the line’s width.

See also

lineWidthUnit()

Parameters:

unit (Qgis.RenderUnit)

setOffset(self, offset: float)[source]

Sets the offset distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.

Units are specified via setOffsetUnit().

See also

offset()

See also

setOffsetUnit()

Parameters:

offset (float)

setOffsetMapUnitScale(self, scale: QgsMapUnitScale)[source]

Sets the map unit scale for the pattern’s line offset.

See also

setOffset()

See also

setOffsetUnit()

Parameters:

scale (QgsMapUnitScale)

setOffsetUnit(self, unit: Qgis.RenderUnit)[source]

Sets the unit for the line pattern’s offset.

See also

offsetUnit()

Parameters:

unit (Qgis.RenderUnit)