Class: QgsSimpleFillSymbolLayer¶
- class qgis.core.QgsSimpleFillSymbolLayer(color: QColor | Qt.GlobalColor | QGradient = DEFAULT_SIMPLEFILL_COLOR, style: Qt.BrushStyle = DEFAULT_SIMPLEFILL_STYLE, strokeColor: QColor | Qt.GlobalColor | QGradient = DEFAULT_SIMPLEFILL_BORDERCOLOR, strokeStyle: Qt.PenStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE, strokeWidth: float = DEFAULT_SIMPLEFILL_BORDERWIDTH, penJoinStyle: Qt.PenJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE)¶
Bases:
QgsFillSymbolLayer
Methods
- rtype:
Qt.BrushStyle
- rtype:
QgsSimpleFillSymbolLayer
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
QgsSimpleFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).- param element:
- param context:
- param context:
- rtype:
Qt.BrushStyle
- param context:
- rtype:
Qt.PenStyle
- param e:
- param context:
- rtype:
QColor
- rtype:
str
- rtype:
QgsMapUnitScale
Returns the offset by which polygons will be translated during rendering.
Returns the map unit scale for the fill's offset.
Returns the units for the fill's offset.
- param mmScaleFactor:
- rtype:
QgsUnitTypes.RenderUnit
- rtype:
Qt.PenJoinStyle
- rtype:
Dict[str, Any]
- param points:
Restores older data defined properties from string map.
- param style:
- param color:
- param scale:
Sets an
offset
by which polygons will be translated during rendering.Sets the map unit
scale
for the fill's offset.Sets the
unit
for the fill's offset.- param unit:
- param style:
- param strokeColor:
- param strokeStyle:
- param strokeWidth:
- param scale:
Sets the units for the width of the fill's stroke.
- param context:
- param context:
- rtype:
QColor
- rtype:
Qt.PenStyle
- rtype:
float
- rtype:
QgsMapUnitScale
Returns the units for the width of the fill's stroke.
- param doc:
- rtype:
bool
- brushStyle(self) Qt.BrushStyle ¶
- Return type:
Qt.BrushStyle
- clone(self) QgsSimpleFillSymbolLayer ¶
- Return type:
- 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
New in version 2.9.
- create(properties: Dict[str, Any] = {}) QgsSymbolLayer ¶
Creates a new
QgsSimpleFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).Caller takes ownership of the returned symbol layer.
- Parameters:
properties (Dict[str) –
- Return type:
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
- Parameters:
element (QDomElement) –
- Return type:
- dxfAngle(self, context: QgsSymbolRenderContext) float ¶
- Parameters:
context (QgsSymbolRenderContext) –
- Return type:
float
- dxfBrushColor(self, context: QgsSymbolRenderContext) QColor ¶
- Parameters:
context (QgsSymbolRenderContext) –
- Return type:
QColor
- dxfBrushStyle(self) Qt.BrushStyle ¶
- Return type:
Qt.BrushStyle
- dxfColor(self, context: QgsSymbolRenderContext) QColor ¶
- Parameters:
context (QgsSymbolRenderContext) –
- Return type:
QColor
- dxfPenStyle(self) Qt.PenStyle ¶
- Return type:
Qt.PenStyle
- dxfWidth(self, e: QgsDxfExport, context: QgsSymbolRenderContext) float ¶
- Parameters:
e (QgsDxfExport) –
context (QgsSymbolRenderContext) –
- Return type:
float
- estimateMaxBleed(self, context: QgsRenderContext) float ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
float
- fillColor(self) QColor ¶
- Return type:
QColor
- layerType(self) str ¶
- Return type:
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- offset(self) QPointF ¶
Returns the offset by which polygons will be translated during rendering.
Units are specified by
offsetUnit()
.See also
See also
- Return type:
QPointF
- offsetMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the fill’s offset.
See also
See also
- Return type:
- offsetUnit(self) QgsUnitTypes.RenderUnit ¶
Returns the units for the fill’s offset.
See also
See also
- Return type:
- ogrFeatureStyle(self, mmScaleFactor: float, mapUnitScaleFactor: float) str ¶
- Parameters:
mmScaleFactor (float) –
mapUnitScaleFactor (float) –
- Return type:
str
- outputUnit(self) QgsUnitTypes.RenderUnit ¶
- Return type:
- penJoinStyle(self) Qt.PenJoinStyle ¶
- Return type:
Qt.PenJoinStyle
- properties(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- 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.
New in version 3.0.
- setBrushStyle(self, style: Qt.BrushStyle)¶
- Parameters:
style (Qt.BrushStyle) –
- setFillColor(self, color: QColor | Qt.GlobalColor | QGradient)¶
- Parameters:
color (Union[QColor) –
- setMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters:
scale (QgsMapUnitScale) –
- setOffset(self, offset: QPointF | QPoint)¶
Sets an
offset
by which polygons will be translated during rendering.Units are specified by
offsetUnit()
.See also
See also
- Parameters:
offset (Union[QPointF) –
- setOffsetMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the fill’s offset.See also
See also
- Parameters:
scale (QgsMapUnitScale) –
- setOffsetUnit(self, unit: QgsUnitTypes.RenderUnit)¶
Sets the
unit
for the fill’s offset.See also
See also
- Parameters:
unit (QgsUnitTypes.RenderUnit) –
- setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)¶
- Parameters:
unit (QgsUnitTypes.RenderUnit) –
- setPenJoinStyle(self, style: Qt.PenJoinStyle)¶
- Parameters:
style (Qt.PenJoinStyle) –
- setStrokeColor(self, strokeColor: QColor | Qt.GlobalColor | QGradient)¶
- Parameters:
strokeColor (Union[QColor) –
- setStrokeStyle(self, strokeStyle: Qt.PenStyle)¶
- Parameters:
strokeStyle (Qt.PenStyle) –
- setStrokeWidth(self, strokeWidth: float)¶
- Parameters:
strokeWidth (float) –
- setStrokeWidthMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters:
scale (QgsMapUnitScale) –
- setStrokeWidthUnit(self, unit: QgsUnitTypes.RenderUnit)¶
Sets the units for the width of the fill’s stroke.
- Parameters:
unit (QgsUnitTypes.RenderUnit) – width units
See also
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- strokeColor(self) QColor ¶
- Return type:
QColor
- strokeStyle(self) Qt.PenStyle ¶
- Return type:
Qt.PenStyle
- strokeWidth(self) float ¶
- Return type:
float
- strokeWidthMapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- strokeWidthUnit(self) QgsUnitTypes.RenderUnit ¶
Returns the units for the width of the fill’s stroke.
See also
- Return type:
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])¶
- Parameters:
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
- usesMapUnits(self) bool ¶
- Return type:
bool