Class: QgsShadowEffect¶
-
class
qgis.core.
QgsShadowEffect
¶ Bases:
QgsPaintEffect
Base class for paint effects which offset, blurred shadows
Methods
Returns the blend mode for the effect
Returns the blur level (radius) for the shadow.
Returns the map unit scale used for the shadow blur strength (radius).
Returns the units used for the shadow blur level (radius).
- param rect
Returns the color used for the shadow.
- param context
Specifies whether the shadow is drawn outside the picture or within the picture.
Returns the angle used for offsetting the shadow.
Returns the distance used for offsetting the shadow.
Returns the map unit scale used for the shadow offset distance.
Returns the units used for the shadow offset distance.
Returns the opacity for the effect.
- rtype
Dict[str, str]
- param props
Sets the blend mode for the effect
Sets blur level (radius) for the shadow.
Sets the map unit scale used for the shadow blur strength (radius).
Sets the units used for the shadow blur level (radius).
Sets the color for the shadow.
Sets the angle for offsetting the shadow.
Sets the distance for offsetting the shadow.
Sets the map unit scale used for the shadow offset distance.
Sets the units used for the shadow offset distance.
Sets the
opacity
for the effect.-
blendMode
(self) → QPainter.CompositionMode¶ Returns the blend mode for the effect
- Return type
QPainter.CompositionMode
- Returns
blend mode used for drawing the effect on to a destination paint device
See also
-
blurLevel
(self) → float¶ Returns the blur level (radius) for the shadow.
- Return type
float
- Returns
blur level. values indicating greater blur strength.
See also
See also
See also
-
blurMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale used for the shadow blur strength (radius).
- Return type
- Returns
map unit scale for blur strength
See also
See also
See also
New in version 3.4.9.
-
blurUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units used for the shadow blur level (radius).
- Return type
- Returns
units for blur level
See also
See also
See also
New in version 3.4.9.
-
boundingRect
(self, rect: QRectF, context: QgsRenderContext) → QRectF¶ - Parameters
rect (QRectF) –
context (QgsRenderContext) –
- Return type
QRectF
-
color
(self) → QColor¶ Returns the color used for the shadow.
- Return type
QColor
- Returns
shadow color
See also
-
draw
(self, context: QgsRenderContext)¶ - Parameters
context (QgsRenderContext) –
-
drawSource
()¶
-
exteriorShadow
(self) → bool¶ Specifies whether the shadow is drawn outside the picture or within the picture.
- Return type
bool
- 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.
- Return type
int
- Returns
offset angle in degrees clockwise from North
See also
See also
-
offsetDistance
(self) → float¶ Returns the distance used for offsetting the shadow.
- Return type
float
- 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.
- Return type
- 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.
- Return type
- Returns
units for offset distance
See also
See also
See also
-
opacity
(self) → float¶ Returns the opacity for the effect.
- Return type
float
- 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]¶ - Return type
Dict[str, str]
-
readProperties
(self, props: Dict[str, str])¶ - Parameters
props (Dict[str) –
-
setBlendMode
(self, mode: QPainter.CompositionMode)¶ Sets the blend mode for the effect
- Parameters
mode (QPainter.CompositionMode) – blend mode used for drawing the effect on to a destination paint device
See also
-
setBlurLevel
(self, level: float)¶ Sets blur level (radius) for the shadow.
- Parameters
level (float) – blur level. values indicating greater blur strength.
See also
See also
See also
-
setBlurMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale used for the shadow blur strength (radius).
- Parameters
scale (QgsMapUnitScale) – map unit scale for blur strength
See also
See also
See also
New in version 3.4.9.
-
setBlurUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units used for the shadow blur level (radius).
- Parameters
unit (QgsUnitTypes.RenderUnit) – units for blur level
See also
See also
See also
New in version 3.4.9.
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the color for the shadow.
- Parameters
color (Union[QColor) – shadow color
See also
-
setOffsetAngle
(self, angle: int)¶ Sets the angle for offsetting the shadow.
- Parameters
angle (int) – offset angle in degrees clockwise from North
See also
See also
-
setOffsetDistance
(self, distance: float)¶ Sets the distance for offsetting the shadow.
- Parameters
distance (float) – 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 (QgsMapUnitScale) – 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 (QgsUnitTypes.RenderUnit) – units for offset distance
See also
See also
See also
-
setOpacity
(self, opacity: float)¶ Sets the
opacity
for the effect.- Parameters
opacity (float) – double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque
See also
-
source
()¶
-
sourceAsImage
()¶