Class: QgsTransformEffect

A paint effect which applies transformations (such as move, scale and rotate) to a picture.

Class Hierarchy

Inheritance diagram of qgis.core.QgsTransformEffect

Base classes

QgsPaintEffect

Base class for visual effects which can be applied to QPicture drawings.

Methods

reflectX

Returns whether transform will be reflected along the x-axis

reflectY

Returns whether transform will be reflected along the y-axis

rotation

Returns the transform rotation, in degrees clockwise.

scaleX

Returns the x axis scaling factor.

scaleY

Returns the y axis scaling factor.

setReflectX

Sets whether to reflect along the x-axis

setReflectY

Sets whether to reflect along the y-axis

setRotation

Sets the transform rotation, in degrees clockwise.

setScaleX

Sets the x axis scaling factor.

setScaleY

Sets the y axis scaling factor.

setShearX

Sets the x axis shearing factor.

setShearY

Sets the y axis shearing factor.

setTranslateMapUnitScale

Sets the map unit scale used for the transform translation.

setTranslateUnit

Sets the units used for the transform translation.

setTranslateX

Sets the transform x translation.

setTranslateY

Sets the transform y translation.

shearX

Returns the x axis shearing factor.

shearY

Returns the y axis shearing factor.

translateMapUnitScale

Returns the map unit scale used for the transform translation.

translateUnit

Returns the units used for the transform translation.

translateX

Returns the transform x translation.

translateY

Returns the transform y translation.

Static Methods

create

Creates a new QgsTransformEffect effect from a properties string map.

class qgis.core.QgsTransformEffect[source]

Bases: QgsPaintEffect

static create(map: Dict[str, Any]) QgsPaintEffect | None[source]

Creates a new QgsTransformEffect effect from a properties string map.

Parameters:

map (Dict[str, Any]) – encoded properties string map

Return type:

Optional[QgsPaintEffect]

Returns:

new QgsTransformEffect

reflectX(self) bool[source]

Returns whether transform will be reflected along the x-axis

Return type:

bool

Returns:

True if transform will reflect horizontally

See also

setReflectX()

See also

reflectY()

reflectY(self) bool[source]

Returns whether transform will be reflected along the y-axis

Return type:

bool

Returns:

True if transform will reflect horizontally

See also

setReflectY()

See also

reflectX()

rotation(self) float[source]

Returns the transform rotation, in degrees clockwise.

See also

setRotation()

Return type:

float

scaleX(self) float[source]

Returns the x axis scaling factor.

Return type:

float

Returns:

x axis scaling factor, where 1.0 = no scaling

See also

setScaleX()

See also

scaleY()

scaleY(self) float[source]

Returns the y axis scaling factor.

Return type:

float

Returns:

y axis scaling factor, where 1.0 = no scaling

See also

setScaleY()

See also

scaleX()

setReflectX(self, reflectX: bool)[source]

Sets whether to reflect along the x-axis

Parameters:

reflectX (bool) – True to reflect horizontally

See also

reflectX()

See also

setReflectY()

setReflectY(self, reflectY: bool)[source]

Sets whether to reflect along the y-axis

Parameters:

reflectY (bool) – True to reflect horizontally

See also

reflectY()

See also

setReflectX()

setRotation(self, rotation: float)[source]

Sets the transform rotation, in degrees clockwise.

See also

rotation()

Parameters:

rotation (float)

setScaleX(self, scaleX: float)[source]

Sets the x axis scaling factor.

Parameters:

scaleX (float) – factor to scale x axis by, where 1.0 = no scaling

See also

scaleX()

See also

setScaleY()

setScaleY(self, scaleY: float)[source]

Sets the y axis scaling factor.

Parameters:

scaleY (float) – factor to scale y axis by, where 1.0 = no scaling

See also

scaleX()

setShearX(self, shearX: float)[source]

Sets the x axis shearing factor.

Parameters:

shearX (float) – x axis shearing

See also

shearX()

See also

setShearY()

setShearY(self, shearY: float)[source]

Sets the y axis shearing factor.

Parameters:

shearY (float) – y axis shearing

See also

shearY()

See also

setShearX()

setTranslateMapUnitScale(self, scale: QgsMapUnitScale)[source]

Sets the map unit scale used for the transform translation.

Parameters:

scale (QgsMapUnitScale) – map unit scale for translation

See also

setTranslateX()

See also

setTranslateY()

setTranslateUnit(self, unit: Qgis.RenderUnit)[source]

Sets the units used for the transform translation.

Parameters:

unit (Qgis.RenderUnit) – units for translation

See also

translateUnit()

See also

setTranslateX()

See also

setTranslateY()

setTranslateX(self, translateX: float)[source]

Sets the transform x translation.

Parameters:

translateX (float) – distance to translate along the x axis

See also

translateX()

See also

setTranslateY()

setTranslateY(self, translateY: float)[source]

Sets the transform y translation.

Parameters:

translateY (float) – distance to translate along the y axis

See also

translateY()

See also

setTranslateX()

shearX(self) float[source]

Returns the x axis shearing factor.

Return type:

float

Returns:

x axis shearing

See also

setShearX()

See also

shearY()

shearY(self) float[source]

Returns the y axis shearing factor.

Return type:

float

Returns:

y axis shearing

See also

setShearY()

See also

shearX()

translateMapUnitScale(self) QgsMapUnitScale

Returns the map unit scale used for the transform translation.

Return type:

QgsMapUnitScale

Returns:

map unit scale for translation

See also

translateX()

See also

translateY()

See also

translateUnit()

translateUnit(self) Qgis.RenderUnit[source]

Returns the units used for the transform translation.

Return type:

Qgis.RenderUnit

Returns:

units for translation

See also

translateX()

See also

translateY()

translateX(self) float[source]

Returns the transform x translation.

Return type:

float

Returns:

X distance translated along the x axis

See also

setTranslateX()

See also

translateY()

See also

translateUnit()

translateY(self) float[source]

Returns the transform y translation.

Return type:

float

Returns:

Y distance translated along the y axis

See also

setTranslateY()

See also

translateX()

See also

translateUnit()