Class: QgsLinePatternFillSymbolLayer

class qgis.core.QgsLinePatternFillSymbolLayer

Bases: QgsImageFillSymbolLayer

A symbol fill consisting of repeated parallel lines.

Methods

applyDataDefinedSettings

param context

clone

rtype

QgsLinePatternFillSymbolLayer

color

rtype

QColor

copyDataDefinedProperties

copyPaintEffect

create

Creates a new QgsLinePatternFillSymbolLayer from a properties map.

createFromSld

Creates a new QgsLinePatternFillSymbolLayer from a SLD element.

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.

estimateMaxBleed

param context

hasDataDefinedProperties

rtype

bool

layerType

rtype

str

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.

mapUnitScale

rtype

QgsMapUnitScale

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

param widthScaleFactor

outputUnit

rtype

QgsUnitTypes.RenderUnit

properties

rtype

Dict[str, str]

restoreOldDataDefinedProperties

setColor

param c

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.

setMapUnitScale

param scale

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.

setOutputUnit

param unit

setSubSymbol

param symbol

startRender

param context

stopRender

param context

subSymbol

rtype

QgsSymbol

toSld

param doc

usedAttributes

param context

applyDataDefinedSettings(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

clone(self)QgsLinePatternFillSymbolLayer
Return type

QgsLinePatternFillSymbolLayer

color(self) → QColor
Return type

QColor

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

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

Parameters

properties (Dict[str) –

Return type

QgsSymbolLayer

createFromSld(element: QDomElement)QgsSymbolLayer

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

Parameters

element (QDomElement) –

Return type

QgsSymbolLayer

distance(self) → float

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) → QgsUnitTypes.RenderUnit

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

See also

distance()

Return type

QgsUnitTypes.RenderUnit

estimateMaxBleed(self, context: QgsRenderContext) → float
Parameters

context (QgsRenderContext) –

Return type

float

hasDataDefinedProperties(self) → bool
Return type

bool

layerType(self) → str
Return type

str

lineAngle(self) → float

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

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) → QgsUnitTypes.RenderUnit

Returns the units for the line’s width.

Return type

QgsUnitTypes.RenderUnit

mapUnitScale(self)QgsMapUnitScale
Return type

QgsMapUnitScale

offset(self) → float

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) → QgsUnitTypes.RenderUnit

Returns the units for the line pattern’s offset.

See also

setOffsetUnit()

Return type

QgsUnitTypes.RenderUnit

ogrFeatureStyleWidth(self, widthScaleFactor: float) → str
Parameters

widthScaleFactor (float) –

Return type

str

outputUnit(self) → QgsUnitTypes.RenderUnit
Return type

QgsUnitTypes.RenderUnit

properties(self) → Dict[str, str]
Return type

Dict[str, str]

restoreOldDataDefinedProperties()
setColor(self, c: Union[QColor, Qt.GlobalColor])
Parameters

c (Union[QColor) –

setDistance(self, d: float)

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)

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

See also

setDistance()

Parameters

scale (QgsMapUnitScale) –

setDistanceUnit(self, unit: QgsUnitTypes.RenderUnit)

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

See also

distanceUnit()

See also

setDistance()

Parameters

unit (QgsUnitTypes.RenderUnit) –

setLineAngle(self, a: float)

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)

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)

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

See also

setLineWidth()

Parameters

scale (QgsMapUnitScale) –

setLineWidthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the line’s width.

See also

lineWidthUnit()

Parameters

unit (QgsUnitTypes.RenderUnit) –

setMapUnitScale(self, scale: QgsMapUnitScale)
Parameters

scale (QgsMapUnitScale) –

setOffset(self, offset: float)

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)

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

See also

setOffset()

See also

setOffsetUnit()

Parameters

scale (QgsMapUnitScale) –

setOffsetUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the line pattern’s offset.

See also

offsetUnit()

Parameters

unit (QgsUnitTypes.RenderUnit) –

setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
Parameters

unit (QgsUnitTypes.RenderUnit) –

setSubSymbol(self, symbol: QgsSymbol) → bool
Parameters

symbol (QgsSymbol) –

Return type

bool

startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

subSymbol(self)QgsSymbol
Return type

QgsSymbol

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])
Parameters
  • doc (QDomDocument) –

  • element (QDomElement) –

  • props (Dict[str) –

usedAttributes(self, context: QgsRenderContext) → Set[str]
Parameters

context (QgsRenderContext) –

Return type

Set[str]