KWin::PaintData Class

Header: #include <effect/effect.h>
CMake: find_package(KWin REQUIRED)
target_link_libraries(mytarget PRIVATE KWin::kwin)
Inherited By:

KWin::WindowPaintData

Public Functions

qreal rotationAngle() const
QVector3D rotationAxis() const
QVector3D rotationOrigin() const
const QVector3D &scale() const
void setRotationAngle(qreal angle)
void setRotationAxis(Qt::Axis axis)
void setRotationAxis(const QVector3D &axis)
void setRotationOrigin(const QVector3D &origin)
void setScale(const QVector2D &scale)
void setScale(const QVector3D &scale)
void setXScale(qreal scale)
void setXTranslation(qreal translate)
void setYScale(qreal scale)
void setYTranslation(qreal translate)
void setZScale(qreal scale)
void setZTranslation(qreal translate)
QMatrix4x4 toMatrix(qreal deviceScale) const
void translate(const QVector3D &translate)
void translate(qreal x, qreal y = 0.0, qreal z = 0.0)
const QVector3D &translation() const
qreal xScale() const
qreal xTranslation() const
qreal yScale() const
qreal yTranslation() const
qreal zScale() const
qreal zTranslation() const

Detailed Description

Member Function Documentation

qreal PaintData::rotationAngle() const

Returns the rotation angle.

Initially 0.0.

See also setRotationAngle.

QVector3D PaintData::rotationAxis() const

The current rotation axis.

By default the rotation is (0/0/1) which means a rotation around the z axis.

Returns The current rotation axis.

See also setRotationAxis.

QVector3D PaintData::rotationOrigin() const

Returns the rotation origin.

That is the point in space which is fixed during the rotation.

Initially this is 0/0/0.

See also setRotationOrigin().

const QVector3D &PaintData::scale() const

See also setScale().

void PaintData::setRotationAngle(qreal angle)

Sets the rotation angle.

angle The new rotation angle.

See also rotationAngle().

void PaintData::setRotationAxis(Qt::Axis axis)

Sets the rotation axis.

Overloaded method for convenience.

axis The axis around which should be rotated.

See also rotationAxis().

void PaintData::setRotationAxis(const QVector3D &axis)

Sets the rotation axis.

Set a component to 1.0 to rotate around this axis and to 0.0 to disable rotation around the axis.

axis A vector holding information on which axis to rotate

See also rotationAxis().

void PaintData::setRotationOrigin(const QVector3D &origin)

Sets the rotation origin.

origin The new rotation origin.

See also rotationOrigin().

void PaintData::setScale(const QVector2D &scale)

Sets the scale factor in X and Y direction.

scale The scale factor for X and Y direction

See also scale().

void PaintData::setScale(const QVector3D &scale)

Sets the scale factor in X, Y and Z direction

scale The scale factor for X, Y and Z direction

void PaintData::setXScale(qreal scale)

Sets the scale factor in X direction to scale

scale The scale factor in X direction

See also xScale().

void PaintData::setXTranslation(qreal translate)

Sets the translation in X direction to translate.

See also xTranslation().

void PaintData::setYScale(qreal scale)

Sets the scale factor in Y direction to scale

scale The scale factor in Y direction

See also yScale().

void PaintData::setYTranslation(qreal translate)

Sets the translation in Y direction to translate.

See also yTranslation().

void PaintData::setZScale(qreal scale)

Sets the scale factor in Z direction to scale

scale The scale factor in Z direction

See also zScale().

void PaintData::setZTranslation(qreal translate)

Sets the translation in Z direction to translate.

See also zTranslation().

QMatrix4x4 PaintData::toMatrix(qreal deviceScale) const

Returns the corresponding transform matrix.

The transform matrix is converted to device coordinates using the supplied deviceScale.

void PaintData::translate(const QVector3D &translate)

Performs a translation by adding the values component wise.

Overloaded method for convenience.

translate The translation

void PaintData::translate(qreal x, qreal y = 0.0, qreal z = 0.0)

Performs a translation by adding the values component wise.

x Translation in X direction

y Translation in Y direction

z Translation in Z direction

const QVector3D &PaintData::translation() const

qreal PaintData::xScale() const

Returns scale factor in X direction.

See also setXScale().

qreal PaintData::xTranslation() const

Returns the translation in X direction.

See also setXTranslation().

qreal PaintData::yScale() const

Returns scale factor in Y direction.

See also setYScale().

qreal PaintData::yTranslation() const

Returns the translation in Y direction.

See also setYTranslation().

qreal PaintData::zScale() const

Returns scale factor in Z direction.

See also setZScale().

qreal PaintData::zTranslation() const

Returns the translation in Z direction.

See also setZTranslation().