Subgroup: S
Class: QgsSVGFillSymbolLayer¶
-
class
qgis.core.
QgsSVGFillSymbolLayer
(svgFilePath: str, width: float = 20, rotation: float = 0)¶ Bases:
qgis._core.QgsImageFillSymbolLayer
Constructs SVG fill symbol layer with picture from given absolute path to a SVG file
QgsSVGFillSymbolLayer(svgData: Union[QByteArray, bytes, bytearray], width: float = 20, rotation: float = 0)
A class for svg fill patterns. The class automatically scales the pattern to the appropriate pixel dimensions of the output device*
Methods
applyDataDefinedSettings
clone
copyDataDefinedProperties
copyPaintEffect
create
createFromSld
layerType
mapUnitScale
outputUnit
patternWidth
patternWidthMapUnitScale
patternWidthUnit
Returns the units for the width of the SVG images in the pattern. properties
resolvePaths
Turns relative paths in properties map to absolute when reading and vice versa when writing. restoreOldDataDefinedProperties
setMapUnitScale
setOutputUnit
setPatternWidth
setPatternWidthMapUnitScale
setPatternWidthUnit
Sets the units for the width of the SVG images in the pattern. setSvgFilePath
setSvgFillColor
setSvgStrokeColor
setSvgStrokeWidth
setSvgStrokeWidthMapUnitScale
setSvgStrokeWidthUnit
Sets the units for the stroke width. startRender
stopRender
svgFilePath
svgFillColor
svgStrokeColor
svgStrokeWidth
svgStrokeWidthMapUnitScale
svgStrokeWidthUnit
Returns the units for the stroke width. toSld
Signals
Attributes
-
applyDataDefinedSettings
(self, context: QgsSymbolRenderContext)¶
-
clone
(self) → QgsSVGFillSymbolLayer¶
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
create
(properties: Dict[str, str] = {}) → QgsSymbolLayer¶
-
createFromSld
(element: QDomElement) → QgsSymbolLayer¶
-
layerType
(self) → str¶
-
mapUnitScale
(self) → QgsMapUnitScale¶
-
outputUnit
(self) → QgsUnitTypes.RenderUnit¶
-
patternWidth
(self) → float¶
-
patternWidthMapUnitScale
(self) → QgsMapUnitScale¶
-
patternWidthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the width of the SVG images in the pattern.
See also
-
properties
(self) → Dict[str, str]¶
-
resolvePaths
(properties: Dict[str, str], pathResolver: QgsPathResolver, saving: bool)¶ Turns relative paths in properties map to absolute when reading and vice versa when writing. Used internally when reading/writing symbols.
New in version 3.0.
-
restoreOldDataDefinedProperties
()¶
-
setMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setOutputUnit
(self, unit: QgsUnitTypes.RenderUnit)¶
-
setPatternWidth
(self, width: float)¶
-
setPatternWidthMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setPatternWidthUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the width of the SVG images in the pattern.
Parameters: unit – width units See also
-
setSvgFilePath
(self, svgPath: str)¶
-
setSvgFillColor
(self, c: Union[QColor, Qt.GlobalColor])¶
-
setSvgStrokeColor
(self, c: Union[QColor, Qt.GlobalColor])¶
-
setSvgStrokeWidth
(self, w: float)¶
-
setSvgStrokeWidthMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setSvgStrokeWidthUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the stroke width.
Parameters: unit – width units See also
-
startRender
(self, context: QgsSymbolRenderContext)¶
-
stopRender
(self, context: QgsSymbolRenderContext)¶
-
svgFilePath
(self) → str¶
-
svgFillColor
(self) → QColor¶
-
svgStrokeColor
(self) → QColor¶
-
svgStrokeWidth
(self) → float¶
-
svgStrokeWidthMapUnitScale
(self) → QgsMapUnitScale¶
-
svgStrokeWidthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the stroke width.
See also
-
toSld
(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])¶
-