Class TransformMask
Build from TransformMask.h
Krita 5.0.0Krita 5.2.0

The TransformMask class A transform mask is a mask type node that can be used to store transformations.

Methods

finalAffineTransform()QTransform fromXML(xml: str)bool toXML()str

Re-implemented methods

type()str

Member documentation

finalAffineTransform()QTransform
Krita 5.0.0

Return

(no description provided)

fromXML(xml: str)bool
Krita 5.2.0

set the transform of the transform mask from XML formatted data. The xml must have a valid id

dumbparams - placeholder for static transform masks tooltransformparams - static transform mask animatedtransformparams - animated transform mask

<!DOCTYPE transform_params><transform_params> <main id="tooltransformparams"/> <data mode="0"> <free_transform> <transformedCenter type="pointf" x="12.3102137276208" y="11.0727768562035"/> <originalCenter type="pointf" x="20" y="20"/> <rotationCenterOffset type="pointf" x="0" y="0"/> <transformAroundRotationCenter value="0" type="value"/> <aX value="0" type="value"/> <aY value="0" type="value"/> <aZ value="0" type="value"/> <cameraPos z="1024" type="vector3d" x="0" y="0"/> <scaleX value="1" type="value"/> <scaleY value="1" type="value"/> <shearX value="0" type="value"/> <shearY value="0" type="value"/> <keepAspectRatio value="0" type="value"/> <flattenedPerspectiveTransform m23="0" m31="0" m32="0" type="transform" m33="1" m12="0" m13="0" m22="1" m11="1" m21="0"/> <filterId value="Bicubic" type="value"/> </free_transform> </data></transform_params>

Parameters

xml

a valid formated XML string with proper main and data elements.

Return

a true response if successful, a false response if failed.

toXML()str
Krita 5.2.0

Return

a string containing XML formated transform parameters.

type()str
Krita 5.0.0

Krita has several types of nodes, split in layers and masks. Group layers can contain other layers, any layer can contain masks.

Return

transformmask

If the Node object isn't wrapping a valid Krita layer or mask object, and empty string is returned.