Class: QgsInnerGlowEffect

class qgis.core.QgsInnerGlowEffect

Bases: QgsGlowEffect

A paint effect which draws a glow within a picture.

New in version 2.9:

Methods

boundingRect

clone

rtype:

QgsInnerGlowEffect

create

Creates a new QgsInnerGlowEffect effect from a properties string map.

draw

drawSource

Draws the source QPicture onto the specified painter.

fixQPictureDpi

Applies a workaround to a QPainter to avoid an issue with incorrect scaling when drawing QPictures.

imageOffset

Returns the offset which should be used when drawing the source image on to a destination render context.

shadeExterior

rtype:

bool

source

Returns the source QPicture.

sourceAsImage

Returns the source QPicture rendered to a new QImage.

type

rtype:

str

boundingRect(self, rect: QRectF, context: QgsRenderContext) QRectF
clone(self) QgsInnerGlowEffect
Return type:

QgsInnerGlowEffect

create(map: Dict[str, Any]) QgsPaintEffect

Creates a new QgsInnerGlowEffect effect from a properties string map.

Parameters:

map (Dict[str) – encoded properties string map

Return type:

QgsPaintEffect

Returns:

new QgsInnerGlowEffect

draw(self, context: QgsRenderContext)
drawSource(self, painter: QPainter)

Draws the source QPicture onto the specified painter. Handles scaling of the picture to account for the destination painter’s DPI.

Parameters:

painter – destination painter

See also

source()

See also

sourceAsImage()

fixQPictureDpi(self, painter: QPainter)

Applies a workaround to a QPainter to avoid an issue with incorrect scaling when drawing QPictures. This may need to be called by derived classes prior to rendering results onto a painter.

Parameters:

painter – destination painter

imageOffset(self, context: QgsRenderContext) QPointF

Returns the offset which should be used when drawing the source image on to a destination render context.

Parameters:

context – destination render context

Returns:

point offset for image top left corner

See also

sourceAsImage()

shadeExterior(self) bool
Return type:

bool

source(self) QPicture

Returns the source QPicture. The draw() member can utilize this when drawing the effect.

Returns:

source QPicture

See also

drawSource()

See also

sourceAsImage()

sourceAsImage(self, context: QgsRenderContext) QImage

Returns the source QPicture rendered to a new QImage. The draw() member can utilize this when drawing the effect. The image will be padded or cropped from the original source QPicture by the results of the boundingRect() method. The result is cached to speed up subsequent calls to sourceAsImage.

Returns:

source QPicture rendered to an image

See also

drawSource()

See also

source()

See also

imageOffset()

See also

boundingRect()

type(self) str
Return type:

str