Class: QgsDrawSourceEffect¶
-
class
qgis.core.
QgsDrawSourceEffect
¶ Bases:
qgis._core.QgsPaintEffect
Constructor for QgsDrawSourceEffect
QgsDrawSourceEffect(QgsDrawSourceEffect)
A paint effect which draws the source picture with minor or no alterations
The draw source effect can be used to draw an unaltered copy of the original source picture. Minor changes like lowering the opacity and applying a blend mode are supported, however these changes will force the resultant output to be rasterized. If no alterations are performed then the original picture will be rendered as a vector.
New in version 2.9: Enums
Methods
Returns the blend mode for the effect
Creates a new QgsDrawSource effect from a properties string map.
Returns the opacity for the effect
Sets the blend mode for the effect
Sets the
opacity
for the effect.Signals
Attributes
-
blendMode
(self) → QPainter.CompositionMode¶ Returns the blend mode for the effect
- Returns
blend mode used for drawing the source on to a destination paint device
See also
-
boundingRect
()¶
-
clone
(self) → QgsDrawSourceEffect¶
-
create
(map: Dict[str, str]) → QgsPaintEffect¶ Creates a new QgsDrawSource effect from a properties string map.
- Parameters
map – encoded properties string map
- Returns
new QgsDrawSourceEffect
-
draw
(self, context: QgsRenderContext)¶
-
drawSource
()¶
-
fixQPictureDpi
()¶
-
imageOffset
()¶
-
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 source on to a destination paint device
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
()¶
-
type
(self) → str¶
-