Subgroup: other
Class: QgsShadowEffect¶
-
class
qgis.core.
QgsShadowEffect
¶ Bases:
qgis._core.QgsPaintEffect
Base class for paint effects which offset, blurred shadows
New in version 2.9: Methods
blendMode
Returns the blend mode for the effect blurLevel
Returns the blur level (strength) for the shadow. boundingRect
color
Returns the color used for the shadow. draw
drawSource
exteriorShadow
Specifies whether the shadow is drawn outside the picture or within the picture. fixQPictureDpi
imageOffset
offsetAngle
Returns the angle used for offsetting the shadow. offsetDistance
Returns the distance used for offsetting the shadow. offsetMapUnitScale
Returns the map unit scale used for the shadow offset distance. offsetUnit
Returns the units used for the shadow offset distance. opacity
Returns the opacity for the effect. properties
readProperties
setBlendMode
Sets the blend mode for the effect setBlurLevel
Sets blur level (strength) for the shadow. setColor
Sets the color for the shadow. setOffsetAngle
Sets the angle for offsetting the shadow. setOffsetDistance
Sets the distance for offsetting the shadow. setOffsetMapUnitScale
Sets the map unit scale used for the shadow offset distance. setOffsetUnit
Sets the units used for the shadow offset distance. setOpacity
Sets the opacity
for the effect.source
sourceAsImage
Signals
Attributes
-
blendMode
(self) → QPainter.CompositionMode¶ Returns the blend mode for the effect
Returns: blend mode used for drawing the effect on to a destination paint device See also
-
blurLevel
(self) → int¶ Returns the blur level (strength) for the shadow.
Returns: blur level. Value will be between 0 and 16, with larger values indicating greater blur strength. See also
-
boundingRect
(self, rect: QRectF, context: QgsRenderContext) → QRectF¶
-
color
(self) → QColor¶ Returns the color used for the shadow.
Returns: shadow color See also
-
draw
(self, context: QgsRenderContext)¶
-
drawSource
()¶
-
exteriorShadow
(self) → bool¶ Specifies whether the shadow is drawn outside the picture or within the picture.
Returns: true if shadow is to be drawn outside the picture, or false to draw shadow within the picture
-
fixQPictureDpi
()¶
-
imageOffset
()¶
-
offsetAngle
(self) → int¶ Returns the angle used for offsetting the shadow.
Returns: offset angle in degrees clockwise from North See also
See also
-
offsetDistance
(self) → float¶ Returns the distance used for offsetting the shadow.
Returns: offset distance. Distance units are retrieved via offsetUnit() See also
See also
See also
-
offsetMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale used for the shadow offset distance.
Returns: map unit scale for offset distance See also
See also
See also
-
offsetUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units used for the shadow offset distance.
Returns: units for offset distance See also
See also
See also
-
opacity
(self) → float¶ Returns the opacity for the effect.
Returns: opacity value between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque See also
-
properties
(self) → Dict[str, str]¶
-
readProperties
(self, props: Dict[str, str])¶
-
setBlendMode
(self, mode: QPainter.CompositionMode)¶ Sets the blend mode for the effect
Parameters: mode – blend mode used for drawing the effect on to a destination paint device See also
-
setBlurLevel
(self, level: int)¶ Sets blur level (strength) for the shadow.
Parameters: level – blur level. Values between 0 and 16 are valid, with larger values indicating greater blur strength. See also
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the color for the shadow.
Parameters: color – shadow color See also
-
setOffsetAngle
(self, angle: int)¶ Sets the angle for offsetting the shadow.
Parameters: angle – offset angle in degrees clockwise from North See also
See also
-
setOffsetDistance
(self, distance: float)¶ Sets the distance for offsetting the shadow.
Parameters: distance – offset distance. Units are specified via setOffsetUnit() See also
See also
See also
-
setOffsetMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale used for the shadow offset distance.
Parameters: scale – map unit scale for offset distance See also
See also
See also
-
setOffsetUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units used for the shadow offset distance.
Parameters: unit – units for offset distance See also
See also
See also
-
setOpacity
(self, opacity: float)¶ Sets the
opacity
for the effect.Parameters: opacity – double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque See also
-
source
()¶
-
sourceAsImage
()¶
-