Subgroup: other

Class: QgsShapeburstFillSymbolLayer

class qgis.core.QgsShapeburstFillSymbolLayer(color: Union[QColor, Qt.GlobalColor] = DEFAULT_SIMPLEFILL_COLOR, color2: Union[QColor, Qt.GlobalColor] = Qt.white, colorType: QgsShapeburstFillSymbolLayer.ShapeburstColorType = QgsShapeburstFillSymbolLayer.SimpleTwoColor, blurRadius: int = 0, useWholeShape: bool = True, maxDistance: float = 5)

Bases: qgis._core.QgsFillSymbolLayer

QgsShapeburstFillSymbolLayer(QgsShapeburstFillSymbolLayer)

Methods

angle
blurRadius Returns the blur radius, which controls the amount of blurring applied to the fill.
clone
color The fill color.
color2 Returns the color used for the endpoint of the shapeburst fill.
colorRamp Returns the color ramp used for the shapeburst fill.
colorType Returns the color mode used for the shapeburst fill.
copyDataDefinedProperties
copyPaintEffect
create
dataDefinedProperties Returns a reference to the symbol layer’s property collection, used for data defined overrides.
distanceMapUnitScale
distanceUnit Returns the unit for the maximum distance to shade inside of the shape from the polygon’s boundary.
drawPreviewIcon
dxfAngle get angle
dxfBrushColor get brush/fill color
dxfBrushStyle get brush/fill style
dxfColor get color
dxfCustomDashPattern get dash pattern
dxfOffset get offset
dxfPenStyle get pen style
dxfWidth get line width
enabled Returns true if symbol layer is enabled and will be drawn.
estimateMaxBleed
fillColor Get fill color.
ignoreRings Returns whether the shapeburst fill is set to ignore polygon interior rings.
isCompatibleWithSymbol Returns if the layer can be used below the specified symbol
isLocked
layerType
mapUnitScale
maxDistance Returns the maximum distance from the shape’s boundary which is shaded.
offset Returns the offset for the shapeburst fill.
offsetMapUnitScale
offsetUnit Returns the units used for the offset of the shapeburst fill.
ogrFeatureStyle
outputUnit
paintEffect Returns the current paint effect for the layer.
prepareExpressions Prepares all data defined property expressions for evaluation.
properties
propertyDefinitions Returns the symbol layer property definitions.
renderPolygon
renderingPass
restoreOldDataDefinedProperties
setAngle
setBlurRadius Sets the blur radius, which controls the amount of blurring applied to the fill.
setColor The fill color.
setColor2 Sets the color for the endpoint of the shapeburst fill.
setColorRamp Sets the color ramp used to draw the shapeburst fill.
setColorType Sets the color mode to use for the shapeburst fill.
setDataDefinedProperties Sets the symbol layer’s property collection, used for data defined overrides.
setDataDefinedProperty Sets a data defined property for the layer.
setDistanceMapUnitScale
setDistanceUnit Sets the unit for the maximum distance to shade inside of the shape from the polygon’s boundary.
setEnabled Sets whether symbol layer is enabled and should be drawn.
setFillColor Set fill color.
setIgnoreRings Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
setLocked
setMapUnitScale
setMaxDistance Sets the maximum distance to shape inside of the shape from the polygon’s boundary.
setOffset Sets the offset for the shapeburst fill.
setOffsetMapUnitScale
setOffsetUnit Sets the units used for the offset for the shapeburst fill.
setOutputUnit
setPaintEffect Sets the current paint effect for the layer.
setRenderingPass
setStrokeColor Set stroke color.
setSubSymbol set layer’s subsymbol. takes ownership of the passed symbol
setUseWholeShape Sets whether the shapeburst fill should be drawn using the entire shape.
startRender
stopRender
strokeColor Get stroke color.
subSymbol Returns the symbol’s sub symbol, if present.
toSld
type
useWholeShape Returns whether the shapeburst fill is set to cover the entire shape.
usedAttributes Returns the set of attributes referenced by the layer.
writeDxf write as DXF

Attributes

ColorRamp
PropertyAngle
PropertyArrowHeadLength
PropertyArrowHeadThickness
PropertyArrowHeadType
PropertyArrowStartWidth
PropertyArrowType
PropertyArrowWidth
PropertyBlurRadius
PropertyCapStyle
PropertyCharacter
PropertyCoordinateMode
PropertyCustomDash
PropertyDisplacementX
PropertyDisplacementY
PropertyDistanceX
PropertyDistanceY
PropertyFile
PropertyFillColor
PropertyFillStyle
PropertyGradientReference1IsCentroid
PropertyGradientReference1X
PropertyGradientReference1Y
PropertyGradientReference2IsCentroid
PropertyGradientReference2X
PropertyGradientReference2Y
PropertyGradientSpread
PropertyGradientType
PropertyHeight
PropertyHorizontalAnchor
PropertyInterval
PropertyJoinStyle
PropertyLayerEnabled
PropertyLineAngle
PropertyLineDistance
PropertyName
PropertyOffset
PropertyOffsetAlongLine
PropertyOpacity
PropertyPlacement
PropertyPreserveAspectRatio
PropertySecondaryColor
PropertyShapeburstIgnoreRings
PropertyShapeburstMaxDistance
PropertyShapeburstUseWholeShape
PropertySize
PropertyStrokeColor
PropertyStrokeStyle
PropertyStrokeWidth
PropertyVerticalAnchor
PropertyWidth
SimpleTwoColor
ColorRamp = 1
class ShapeburstColorType

Bases: int

SimpleTwoColor = 0
blurRadius(self) → int

Returns the blur radius, which controls the amount of blurring applied to the fill.

Returns:Integer representing the radius for fill blur. Higher values indicate a stronger blur. A 0 value indicates that blurring is disabled.

New in version 2.3.

See also

setBlurRadius()

clone(self) → QgsShapeburstFillSymbolLayer
color2(self) → QColor

Returns the color used for the endpoint of the shapeburst fill. This color is only used if the colorType is set to ShapeburstColorType.SimpleTwoColor

Returns:a QColor indicating the color of the endpoint of the gradient

New in version 2.3.

See also

setColor2()

See also

colorType()

colorRamp(self) → QgsColorRamp

Returns the color ramp used for the shapeburst fill. The color ramp is only used if the colorType is set to ShapeburstColorType.ColorRamp

Returns:a QgsColorRamp color ramp

New in version 2.3.

See also

setColorRamp()

See also

colorType()

colorType(self) → QgsShapeburstFillSymbolLayer.ShapeburstColorType

Returns the color mode used for the shapeburst fill. Shapeburst can either be drawn using a QgsColorRamp color ramp or by simply specificing a start and end color.

Returns:current color mode used for the shapeburst fill

New in version 2.3.

See also

setColorType()

See also

color()

See also

color2()

See also

colorRamp()

copyDataDefinedProperties()
copyPaintEffect()
create(properties: Dict[str, str] = {}) → QgsSymbolLayer
distanceMapUnitScale(self) → QgsMapUnitScale
distanceUnit(self) → QgsUnitTypes.RenderUnit

Returns the unit for the maximum distance to shade inside of the shape from the polygon’s boundary.

Returns:distance unit for the maximum distance

New in version 2.3.

See also

maxDistance()

estimateMaxBleed(self, context: QgsRenderContext) → float
ignoreRings(self) → bool

Returns whether the shapeburst fill is set to ignore polygon interior rings.

Returns:True if the shapeburst fill will ignore interior rings when calculating buffered shading.

New in version 2.3.

See also

setIgnoreRings()

layerType(self) → str
mapUnitScale(self) → QgsMapUnitScale
maxDistance(self) → float

Returns the maximum distance from the shape’s boundary which is shaded. This parameter is only effective if useWholeShape is false.

Returns:the maximum distance from the polygon’s boundary which is shaded. Distance units are indicated by distanceUnit.

New in version 2.3.

See also

useWholeShape()

See also

setMaxDistance()

See also

distanceUnit()

offset(self) → QPointF

Returns the offset for the shapeburst fill.

Returns:a QPointF indicating the horizontal/vertical offset amount

New in version 2.3.

See also

setOffset()

See also

offsetUnit()

offsetMapUnitScale(self) → QgsMapUnitScale
offsetUnit(self) → QgsUnitTypes.RenderUnit

Returns the units used for the offset of the shapeburst fill.

Returns:units used for the fill offset

New in version 2.3.

See also

offset()

See also

setOffsetUnit()

outputUnit(self) → QgsUnitTypes.RenderUnit
properties(self) → Dict[str, str]
renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
restoreOldDataDefinedProperties()
setBlurRadius(self, blurRadius: int)

Sets the blur radius, which controls the amount of blurring applied to the fill.

Parameters:blurRadius – Radius for fill blur. Values between 0 - 17 are valid, where higher values results in a stronger blur. Set to 0 to disable blur.

New in version 2.3.

See also

blurRadius()

setColor2(self, color2: Union[QColor, Qt.GlobalColor])

Sets the color for the endpoint of the shapeburst fill. This color is only used if setColorType is set ShapeburstColorType.SimpleTwoColor.

Parameters:color2 – QColor to use for endpoint of gradient

New in version 2.3.

See also

setColorType()

See also

color2()

setColorRamp(self, ramp: QgsColorRamp)

Sets the color ramp used to draw the shapeburst fill. Color ramps are only used if setColorType is set ShapeburstColorType.ColorRamp.

Parameters:ramp – color ramp to use for shapeburst fill

New in version 2.3.

See also

setColorType()

See also

colorRamp()

setColorType(self, colorType: QgsShapeburstFillSymbolLayer.ShapeburstColorType)

Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a QgsColorRamp color ramp or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.

Parameters:colorType – color type to use for shapeburst fill

New in version 2.3.

See also

colorType()

See also

setColor()

See also

setColor2()

See also

setColorRamp()

setDistanceMapUnitScale(self, scale: QgsMapUnitScale)
setDistanceUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the maximum distance to shade inside of the shape from the polygon’s boundary.

Parameters:unit – distance unit for the maximum distance

New in version 2.3.

See also

setMaxDistance()

See also

distanceUnit()

setIgnoreRings(self, ignoreRings: bool)

Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.

Parameters:ignoreRings – Set to true if buffers should ignore interior rings for polygons.

New in version 2.3.

See also

ignoreRings()

setMapUnitScale(self, scale: QgsMapUnitScale)
setMaxDistance(self, maxDistance: float)

Sets the maximum distance to shape inside of the shape from the polygon’s boundary.

Parameters:maxDistance – distance from boundary to shade. setUseWholeShape must be set to false for this parameter to take effect. Distance unit is controlled by setDistanceUnit.

New in version 2.3.

See also

maxDistance()

setOffset(self, offset: Union[QPointF, QPoint])

Sets the offset for the shapeburst fill.

Parameters:offset – QPointF indicating the horizontal/vertical offset amount

New in version 2.3.

See also

offset()

See also

setOffsetUnit()

setOffsetMapUnitScale(self, scale: QgsMapUnitScale)
setOffsetUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the units used for the offset for the shapeburst fill.

Parameters:unit – units for fill offset

New in version 2.3.

See also

setOffset()

See also

offsetUnit()

setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
setUseWholeShape(self, useWholeShape: bool)

Sets whether the shapeburst fill should be drawn using the entire shape.

Parameters:useWholeShape – Set to true if shapeburst should cover entire shape. If false, setMaxDistance is used to calculate how far from the boundary of the shape should

be shaded

New in version 2.3.

See also

useWholeShape()

See also

setMaxDistance()

startRender(self, context: QgsSymbolRenderContext)
stopRender(self, context: QgsSymbolRenderContext)
useWholeShape(self) → bool

Returns whether the shapeburst fill is set to cover the entire shape.

Returns:True if shapeburst fill will cover the entire shape. If false, shapeburst is drawn to a distance of maxDistance from the polygon’s boundary.

New in version 2.3.

See also

maxDistance()