Class: QgsLinePatternFillSymbolLayer¶
- class qgis.core.QgsLinePatternFillSymbolLayer¶
Bases:
QgsImageFillSymbolLayer
A symbol fill consisting of repeated parallel lines.
Methods
- param context:
Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.
- rtype:
QgsLinePatternFillSymbolLayer
- rtype:
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates a new
QgsLinePatternFillSymbolLayer
from aproperties
map.Creates a new
QgsLinePatternFillSymbolLayer
from a SLDelement
.Returns the distance between lines in the fill pattern.
Returns the map unit scale for the pattern's line distance.
Returns the units for the distance between lines in the fill pattern.
- param context:
- rtype:
bool
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
Returns the angle for the parallel lines used to fill the symbol.
Returns the width of the line subsymbol used to render the parallel lines in the fill.
Returns the map unit scale for the pattern's line width.
Returns the units for the line's width.
- rtype:
QgsMapUnitScale
Returns the offset distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.
Returns the map unit scale for the pattern's line offset.
Returns the units for the line pattern's offset.
- param widthScaleFactor:
- rtype:
Qgis.RenderUnit
- rtype:
Dict[str, Any]
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
Restores older data defined properties from string map.
Sets the line clipping
mode
, which defines how lines are clipped at the edges of shapes.- param c:
Sets the distance between lines in the fill pattern.
Sets the map unit
scale
for the pattern's line distance.Sets the
unit
for the distance between lines in the fill pattern.Sets the angle for the parallel lines used to fill the symbol.
Sets the width of the line subsymbol used to render the parallel lines in the fill.
Sets the map unit
scale
for the pattern's line width.Sets the
unit
for the line's width.- param scale:
Sets the
offset
distance for lines within the fill, which is the distance to offset the parallel lines from their normal position.Sets the map unit
scale
for the pattern's line offset.Sets the
unit
for the line pattern's offset.- param unit:
- param symbol:
Returns
True
if the symbol layer should be rendered using the selection color from the render context.- param feature:
- param context:
- param feature:
- param context:
- rtype:
QgsSymbol
- param doc:
- rtype:
QImage
- param context:
- rtype:
bool
- applyBrushTransformFromContext()¶
- applyDataDefinedSettings(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- clipMode(self) Qgis.LineClipMode ¶
Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.
See also
New in version 3.24.
- Return type:
- clone(self) QgsLinePatternFillSymbolLayer ¶
- 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
- create(properties: Dict[str, Any] = {}) QgsSymbolLayer ¶
Creates a new
QgsLinePatternFillSymbolLayer
from aproperties
map. The caller takes ownership of the returned object.- Parameters:
properties (Dict[str) –
- Return type:
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
Creates a new
QgsLinePatternFillSymbolLayer
from a SLDelement
. The caller takes ownership of the returned object.- Parameters:
element (QDomElement) –
- Return type:
- distance(self) float ¶
Returns the distance between lines in the fill pattern. Units are retrieved by
distanceUnit()
.See also
See also
- Return type:
float
- distanceMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the pattern’s line distance.
See also
See also
See also
- Return type:
- distanceUnit(self) Qgis.RenderUnit ¶
Returns the units for the distance between lines in the fill pattern.
See also
See also
- 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
- lineAngle(self) float ¶
Returns the angle for the parallel lines used to fill the symbol.
Angles are in degrees, clockwise from North.
See also
- Return type:
float
- lineWidth(self) float ¶
Returns the width of the line subsymbol used to render the parallel lines in the fill.
See also
- Return type:
float
- lineWidthMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the pattern’s line width.
See also
See also
See also
- Return type:
- lineWidthUnit(self) Qgis.RenderUnit ¶
Returns the units for the line’s width.
See also
- Return type:
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- 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
See also
See also
- Return type:
float
- offsetMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the pattern’s line offset.
See also
See also
See also
- Return type:
- offsetUnit(self) Qgis.RenderUnit ¶
Returns the units for the line pattern’s offset.
See also
- Return type:
- ogrFeatureStyleWidth(self, widthScaleFactor: float) str ¶
- Parameters:
widthScaleFactor (float) –
- Return type:
str
- outputUnit(self) Qgis.RenderUnit ¶
- Return type:
- properties(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- 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.
- renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶
- Parameters:
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
- setClipMode(self, mode: Qgis.LineClipMode)¶
Sets the line clipping
mode
, which defines how lines are clipped at the edges of shapes.See also
New in version 3.24.
- Parameters:
mode (Qgis.LineClipMode) –
- setColor(self, c: QColor | Qt.GlobalColor | QGradient)¶
- 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
See also
- setDistanceMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the pattern’s line distance.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setDistanceUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the distance between lines in the fill pattern.See also
See also
- Parameters:
unit (Qgis.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
- 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
- Parameters:
w (float) –
- setLineWidthMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the pattern’s line width.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setLineWidthUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the line’s width.See also
- Parameters:
unit (Qgis.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
See also
See also
- Parameters:
offset (float) –
- setOffsetMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the pattern’s line offset.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setOffsetUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the line pattern’s offset.See also
- Parameters:
unit (Qgis.RenderUnit) –
- setOutputUnit(self, unit: Qgis.RenderUnit)¶
- Parameters:
unit (Qgis.RenderUnit) –
- shouldRenderUsingSelectionColor(self, context: QgsSymbolRenderContext) bool ¶
Returns
True
if the symbol layer should be rendered using the selection color from the render context.New in version 3.34.
- startFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])¶
- Parameters:
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
- toTiledPatternImage(self) QImage ¶
- Return type:
QImage
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
Set[str]
- usesMapUnits(self) bool ¶
- Return type:
bool