Class: QgsBlurEffect¶
-
class
qgis.core.
QgsBlurEffect
¶ Bases:
QgsPaintEffect
Constructor for QgsBlurEffect.
QgsBlurEffect(
QgsBlurEffect
)A paint effect which blurs a source picture, using a number of different blur methods.
Methods
Returns the blend mode for the effect
Returns the blur level (radius)
Returns the map unit scale used for the blur strength (radius).
Returns the blur method (algorithm) used for performing the blur.
Returns the units used for the blur level (radius).
- param rect
- rtype
QgsBlurEffect
Creates a new
QgsBlurEffect
effect from a properties string map.- param context
Returns the opacity for the effect.
- rtype
Dict[str, str]
- param props
Sets the blend mode for the effect
Sets blur level (radius)
Sets the map unit scale used for the blur strength (radius).
Sets the blur method (algorithm) to use for performing the blur.
Sets the units used for the blur level (radius).
Sets the
opacity
for the effect.- rtype
str
Attributes
-
class
BlurMethod
¶ Bases:
int
-
GaussianBlur
= 1¶
-
StackBlur
= 0¶
-
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)
- Return type
float
- Returns
blur level. Depending on the current blurMethod(), this parameter has different effects
See also
See also
See also
See also
-
blurMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale used for the blur strength (radius).
- Return type
- Returns
map unit scale for blur strength
See also
See also
See also
New in version 3.4.9.
-
blurMethod
(self) → QgsBlurEffect.BlurMethod¶ Returns the blur method (algorithm) used for performing the blur.
- Return type
- Returns
blur method
See also
-
blurUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units used for the 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
-
clone
(self) → QgsBlurEffect¶ - Return type
-
create
(map: Dict[str, str]) → QgsPaintEffect¶ Creates a new
QgsBlurEffect
effect from a properties string map.- Parameters
map (Dict[str) – encoded properties string map
- Return type
- Returns
new QgsBlurEffect
-
draw
(self, context: QgsRenderContext)¶ - Parameters
context (QgsRenderContext) –
-
drawSource
()¶
-
fixQPictureDpi
()¶
-
imageOffset
()¶
-
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)
- Parameters
level (float) – blur level. Depending on the current blurMethod(), this parameter has different effects
See also
See also
See also
See also
-
setBlurMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale used for the blur strength (radius).
- Parameters
scale (QgsMapUnitScale) – map unit scale for blur strength
See also
See also
See also
New in version 3.4.9.
-
setBlurMethod
(self, method: QgsBlurEffect.BlurMethod)¶ Sets the blur method (algorithm) to use for performing the blur.
- Parameters
method (QgsBlurEffect.BlurMethod) – blur method
See also
-
setBlurUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units used for the blur level (radius).
- Parameters
unit (QgsUnitTypes.RenderUnit) – units for blur level
See also
See also
See also
New in version 3.4.9.
-
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
()¶
-
type
(self) → str¶ - Return type
str