API reference - Class QTransform

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QTransform

Sub-classes: TransformationType, QFlags_TransformationType

Public constructors

new QTransformnewConstructor QTransform::QTransform()
new QTransformnew(double h11,
double h12,
double h13,
double h21,
double h22,
double h23,
double h31,
double h32,
double h33 = 1.0)
Constructor QTransform::QTransform(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33)
new QTransformnew(double h11,
double h12,
double h21,
double h22,
double dx,
double dy)
Constructor QTransform::QTransform(double h11, double h12, double h21, double h22, double dx, double dy)
new QTransformnew(const QMatrix mtx)Constructor QTransform::QTransform(const QMatrix &mtx)

Public methods

[const]bool!=(const QTransform arg1)Method bool QTransform::operator!=(const QTransform &)
[const]QTransform*(const QTransform o)Method QTransform QTransform::operator*(const QTransform &o)
[const]QTransform*(double n)Operator QTransform ::operator *(const QTransform &a, qreal n)
QTransform*=(const QTransform arg1)Method QTransform &QTransform::operator*=(const QTransform &)
QTransform*=(double div)Method QTransform &QTransform::operator*=(double div)
[const]QTransform+(double n)Operator QTransform ::operator +(const QTransform &a, qreal n)
QTransform+=(double div)Method QTransform &QTransform::operator+=(double div)
[const]QTransform-(double n)Operator QTransform ::operator -(const QTransform &a, qreal n)
QTransform-=(double div)Method QTransform &QTransform::operator-=(double div)
[const]QTransform/(double n)Operator QTransform ::operator /(const QTransform &a, qreal n)
QTransform/=(double div)Method QTransform &QTransform::operator/=(double div)
[const]bool==(const QTransform arg1)Method bool QTransform::operator==(const QTransform &)
void_assign(const QTransform other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]QTransformadjointMethod QTransform QTransform::adjoint()
QTransformassign(const QTransform arg1)Method QTransform &QTransform::operator=(const QTransform &)
[const]doubledetMethod double QTransform::det()
[const]doubledeterminantMethod double QTransform::determinant()
[const]new QTransform ptrdupCreates a copy of self
[const]doubledxMethod double QTransform::dx()
[const]doubledyMethod double QTransform::dy()
[const]QTransforminverted(bool ptr invertible = 0)Method QTransform QTransform::inverted(bool *invertible)
[const]boolisAffine?Method bool QTransform::isAffine()
[const]boolisIdentity?Method bool QTransform::isIdentity()
[const]boolisInvertible?Method bool QTransform::isInvertible()
[const]boolisRotating?Method bool QTransform::isRotating()
[const]boolisScaling?Method bool QTransform::isScaling()
[const]boolisTranslating?Method bool QTransform::isTranslating()
[const]doublem11Method double QTransform::m11()
[const]doublem12Method double QTransform::m12()
[const]doublem13Method double QTransform::m13()
[const]doublem21Method double QTransform::m21()
[const]doublem22Method double QTransform::m22()
[const]doublem23Method double QTransform::m23()
[const]doublem31Method double QTransform::m31()
[const]doublem32Method double QTransform::m32()
[const]doublem33Method double QTransform::m33()
[const]QPointmap(const QPoint p)Method QPoint QTransform::map(const QPoint &p)
[const]QPointFmap(const QPointF p)Method QPointF QTransform::map(const QPointF &p)
[const]QLinemap(const QLine l)Method QLine QTransform::map(const QLine &l)
[const]QLineFmap(const QLineF l)Method QLineF QTransform::map(const QLineF &l)
[const]QPolygonFmap(const QPolygonF a)Method QPolygonF QTransform::map(const QPolygonF &a)
[const]QPolygonmap(const QPolygon a)Method QPolygon QTransform::map(const QPolygon &a)
[const]QRegionmap(const QRegion r)Method QRegion QTransform::map(const QRegion &r)
[const]QPainterPathmap(const QPainterPath p)Method QPainterPath QTransform::map(const QPainterPath &p)
[const]voidmap(int x,
int y,
int ptr tx,
int ptr ty)
Method void QTransform::map(int x, int y, int *tx, int *ty)
[const]voidmap(double x,
double y,
double ptr tx,
double ptr ty)
Method void QTransform::map(double x, double y, double *tx, double *ty)
[const]QRectmapRect(const QRect arg1)Method QRect QTransform::mapRect(const QRect &)
[const]QRectFmapRect(const QRectF arg1)Method QRectF QTransform::mapRect(const QRectF &)
[const]QPolygonmapToPolygon(const QRect r)Method QPolygon QTransform::mapToPolygon(const QRect &r)
voidresetMethod void QTransform::reset()
QTransformrotate(double a,
const Qt_Axis axis = Qt::ZAxis)
Method QTransform &QTransform::rotate(double a, Qt::Axis axis)
QTransformrotateRadians(double a,
const Qt_Axis axis = Qt::ZAxis)
Method QTransform &QTransform::rotateRadians(double a, Qt::Axis axis)
QTransformscale(double sx,
double sy)
Method QTransform &QTransform::scale(double sx, double sy)
voidsetMatrix(double m11,
double m12,
double m13,
double m21,
double m22,
double m23,
double m31,
double m32,
double m33)
Method void QTransform::setMatrix(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
QTransformshear(double sh,
double sv)
Method QTransform &QTransform::shear(double sh, double sv)
[const]QMatrixtoAffineMethod const QMatrix &QTransform::toAffine()
QTransformtranslate(double dx,
double dy)
Method QTransform &QTransform::translate(double dx, double dy)
[const]QTransformtransposedMethod QTransform QTransform::transposed()
[const]QTransform_TransformationTypetypeMethod QTransform::TransformationType QTransform::type()

Public static methods and constants

[static,const]QTransform_TransformationTypeTxNoneEnum constant QTransform::TxNone
[static,const]QTransform_TransformationTypeTxProjectEnum constant QTransform::TxProject
[static,const]QTransform_TransformationTypeTxRotateEnum constant QTransform::TxRotate
[static,const]QTransform_TransformationTypeTxScaleEnum constant QTransform::TxScale
[static,const]QTransform_TransformationTypeTxShearEnum constant QTransform::TxShear
[static,const]QTransform_TransformationTypeTxTranslateEnum constant QTransform::TxTranslate
QTransformfromScale(double dx,
double dy)
Static method QTransform QTransform::fromScale(double dx, double dy)
QTransformfromTranslate(double dx,
double dy)
Static method QTransform QTransform::fromTranslate(double dx, double dy)
boolquadToQuad(const QPolygonF one,
const QPolygonF two,
QTransform result)
Static method bool QTransform::quadToQuad(const QPolygonF &one, const QPolygonF &two, QTransform &result)
boolquadToSquare(const QPolygonF quad,
QTransform result)
Static method bool QTransform::quadToSquare(const QPolygonF &quad, QTransform &result)
boolsquareToQuad(const QPolygonF square,
QTransform result)
Static method bool QTransform::squareToQuad(const QPolygonF &square, QTransform &result)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

!=

Signature: [const] bool != (const QTransform arg1)

Description: Method bool QTransform::operator!=(const QTransform &)

*

(1) Signature: [const] QTransform * (const QTransform o)

Description: Method QTransform QTransform::operator*(const QTransform &o)

Python specific notes:
This method also implements '__rmul__'.

(2) Signature: [const] QTransform * (double n)

Description: Operator QTransform ::operator *(const QTransform &a, qreal n)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

*=

(1) Signature: QTransform *= (const QTransform arg1)

Description: Method QTransform &QTransform::operator*=(const QTransform &)

(2) Signature: QTransform *= (double div)

Description: Method QTransform &QTransform::operator*=(double div)

+

Signature: [const] QTransform + (double n)

Description: Operator QTransform ::operator +(const QTransform &a, qreal n)

This is the mapping of the global operator to the instance method.

+=

Signature: QTransform += (double div)

Description: Method QTransform &QTransform::operator+=(double div)

-

Signature: [const] QTransform - (double n)

Description: Operator QTransform ::operator -(const QTransform &a, qreal n)

This is the mapping of the global operator to the instance method.

-=

Signature: QTransform -= (double div)

Description: Method QTransform &QTransform::operator-=(double div)

/

Signature: [const] QTransform / (double n)

Description: Operator QTransform ::operator /(const QTransform &a, qreal n)

This is the mapping of the global operator to the instance method.

/=

Signature: QTransform /= (double div)

Description: Method QTransform &QTransform::operator/=(double div)

==

Signature: [const] bool == (const QTransform arg1)

Description: Method bool QTransform::operator==(const QTransform &)

TxNone

Signature: [static,const] QTransform_TransformationType TxNone

Description: Enum constant QTransform::TxNone

Python specific notes:
The object exposes a readable attribute 'TxNone'. This is the getter.

TxProject

Signature: [static,const] QTransform_TransformationType TxProject

Description: Enum constant QTransform::TxProject

Python specific notes:
The object exposes a readable attribute 'TxProject'. This is the getter.

TxRotate

Signature: [static,const] QTransform_TransformationType TxRotate

Description: Enum constant QTransform::TxRotate

Python specific notes:
The object exposes a readable attribute 'TxRotate'. This is the getter.

TxScale

Signature: [static,const] QTransform_TransformationType TxScale

Description: Enum constant QTransform::TxScale

Python specific notes:
The object exposes a readable attribute 'TxScale'. This is the getter.

TxShear

Signature: [static,const] QTransform_TransformationType TxShear

Description: Enum constant QTransform::TxShear

Python specific notes:
The object exposes a readable attribute 'TxShear'. This is the getter.

TxTranslate

Signature: [static,const] QTransform_TransformationType TxTranslate

Description: Enum constant QTransform::TxTranslate

Python specific notes:
The object exposes a readable attribute 'TxTranslate'. This is the getter.

_assign

Signature: void _assign (const QTransform other)

Description: Assigns another object to self

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

adjoint

Signature: [const] QTransform adjoint

Description: Method QTransform QTransform::adjoint()

assign

Signature: QTransform assign (const QTransform arg1)

Description: Method QTransform &QTransform::operator=(const QTransform &)

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

det

Signature: [const] double det

Description: Method double QTransform::det()

determinant

Signature: [const] double determinant

Description: Method double QTransform::determinant()

dup

Signature: [const] new QTransform ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

dx

Signature: [const] double dx

Description: Method double QTransform::dx()

dy

Signature: [const] double dy

Description: Method double QTransform::dy()

fromScale

Signature: [static] QTransform fromScale (double dx, double dy)

Description: Static method QTransform QTransform::fromScale(double dx, double dy)

This method is static and can be called without an instance.

fromTranslate

Signature: [static] QTransform fromTranslate (double dx, double dy)

Description: Static method QTransform QTransform::fromTranslate(double dx, double dy)

This method is static and can be called without an instance.

inverted

Signature: [const] QTransform inverted (bool ptr invertible = 0)

Description: Method QTransform QTransform::inverted(bool *invertible)

isAffine?

Signature: [const] bool isAffine?

Description: Method bool QTransform::isAffine()

isIdentity?

Signature: [const] bool isIdentity?

Description: Method bool QTransform::isIdentity()

isInvertible?

Signature: [const] bool isInvertible?

Description: Method bool QTransform::isInvertible()

isRotating?

Signature: [const] bool isRotating?

Description: Method bool QTransform::isRotating()

isScaling?

Signature: [const] bool isScaling?

Description: Method bool QTransform::isScaling()

isTranslating?

Signature: [const] bool isTranslating?

Description: Method bool QTransform::isTranslating()

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

m11

Signature: [const] double m11

Description: Method double QTransform::m11()

m12

Signature: [const] double m12

Description: Method double QTransform::m12()

m13

Signature: [const] double m13

Description: Method double QTransform::m13()

m21

Signature: [const] double m21

Description: Method double QTransform::m21()

m22

Signature: [const] double m22

Description: Method double QTransform::m22()

m23

Signature: [const] double m23

Description: Method double QTransform::m23()

m31

Signature: [const] double m31

Description: Method double QTransform::m31()

m32

Signature: [const] double m32

Description: Method double QTransform::m32()

m33

Signature: [const] double m33

Description: Method double QTransform::m33()

map

(1) Signature: [const] QPoint map (const QPoint p)

Description: Method QPoint QTransform::map(const QPoint &p)

(2) Signature: [const] QPointF map (const QPointF p)

Description: Method QPointF QTransform::map(const QPointF &p)

(3) Signature: [const] QLine map (const QLine l)

Description: Method QLine QTransform::map(const QLine &l)

(4) Signature: [const] QLineF map (const QLineF l)

Description: Method QLineF QTransform::map(const QLineF &l)

(5) Signature: [const] QPolygonF map (const QPolygonF a)

Description: Method QPolygonF QTransform::map(const QPolygonF &a)

(6) Signature: [const] QPolygon map (const QPolygon a)

Description: Method QPolygon QTransform::map(const QPolygon &a)

(7) Signature: [const] QRegion map (const QRegion r)

Description: Method QRegion QTransform::map(const QRegion &r)

(8) Signature: [const] QPainterPath map (const QPainterPath p)

Description: Method QPainterPath QTransform::map(const QPainterPath &p)

(9) Signature: [const] void map (int x, int y, int ptr tx, int ptr ty)

Description: Method void QTransform::map(int x, int y, int *tx, int *ty)

(10) Signature: [const] void map (double x, double y, double ptr tx, double ptr ty)

Description: Method void QTransform::map(double x, double y, double *tx, double *ty)

mapRect

(1) Signature: [const] QRect mapRect (const QRect arg1)

Description: Method QRect QTransform::mapRect(const QRect &)

(2) Signature: [const] QRectF mapRect (const QRectF arg1)

Description: Method QRectF QTransform::mapRect(const QRectF &)

mapToPolygon

Signature: [const] QPolygon mapToPolygon (const QRect r)

Description: Method QPolygon QTransform::mapToPolygon(const QRect &r)

new

(1) Signature: [static] new QTransform new

Description: Constructor QTransform::QTransform()

This method creates an object of class QTransform.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QTransform new (double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33 = 1.0)

Description: Constructor QTransform::QTransform(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33)

This method creates an object of class QTransform.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QTransform new (double h11, double h12, double h21, double h22, double dx, double dy)

Description: Constructor QTransform::QTransform(double h11, double h12, double h21, double h22, double dx, double dy)

This method creates an object of class QTransform.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QTransform new (const QMatrix mtx)

Description: Constructor QTransform::QTransform(const QMatrix &mtx)

This method creates an object of class QTransform.

Python specific notes:
This method is the default initializer of the object.

quadToQuad

Signature: [static] bool quadToQuad (const QPolygonF one, const QPolygonF two, QTransform result)

Description: Static method bool QTransform::quadToQuad(const QPolygonF &one, const QPolygonF &two, QTransform &result)

This method is static and can be called without an instance.

quadToSquare

Signature: [static] bool quadToSquare (const QPolygonF quad, QTransform result)

Description: Static method bool QTransform::quadToSquare(const QPolygonF &quad, QTransform &result)

This method is static and can be called without an instance.

reset

Signature: void reset

Description: Method void QTransform::reset()

rotate

Signature: QTransform rotate (double a, const Qt_Axis axis = Qt::ZAxis)

Description: Method QTransform &QTransform::rotate(double a, Qt::Axis axis)

rotateRadians

Signature: QTransform rotateRadians (double a, const Qt_Axis axis = Qt::ZAxis)

Description: Method QTransform &QTransform::rotateRadians(double a, Qt::Axis axis)

scale

Signature: QTransform scale (double sx, double sy)

Description: Method QTransform &QTransform::scale(double sx, double sy)

setMatrix

Signature: void setMatrix (double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)

Description: Method void QTransform::setMatrix(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)

shear

Signature: QTransform shear (double sh, double sv)

Description: Method QTransform &QTransform::shear(double sh, double sv)

squareToQuad

Signature: [static] bool squareToQuad (const QPolygonF square, QTransform result)

Description: Static method bool QTransform::squareToQuad(const QPolygonF &square, QTransform &result)

This method is static and can be called without an instance.

toAffine

Signature: [const] QMatrix toAffine

Description: Method const QMatrix &QTransform::toAffine()

translate

Signature: QTransform translate (double dx, double dy)

Description: Method QTransform &QTransform::translate(double dx, double dy)

transposed

Signature: [const] QTransform transposed

Description: Method QTransform QTransform::transposed()

type

Signature: [const] QTransform_TransformationType type

Description: Method QTransform::TransformationType QTransform::type()