KWin::WindowPaintData Class

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

Public Functions

WindowPaintData()
qreal brightness() const
qreal crossFadeProgress() const
qreal multiplyBrightness(qreal factor)
qreal multiplyOpacity(qreal factor)
qreal multiplySaturation(qreal factor)
qreal opacity() const
qreal saturation() const
void setBrightness(qreal brightness)
void setCrossFadeProgress(qreal factor)
void setOpacity(qreal opacity)
void setSaturation(qreal saturation) const
KWin::WindowPaintData &operator*=(const QVector2D &scale)
KWin::WindowPaintData &operator*=(const QVector3D &scale)
KWin::WindowPaintData &operator*=(qreal scale)
KWin::WindowPaintData &operator+=(const QPoint &translation)
KWin::WindowPaintData &operator+=(const QPointF &translation)
KWin::WindowPaintData &operator+=(const QVector2D &translation)
KWin::WindowPaintData &operator+=(const QVector3D &translation)

Detailed Description

Member Function Documentation

WindowPaintData::WindowPaintData()

Constructs an identity WindowPaintData.

qreal WindowPaintData::brightness() const

Brightness of the window, in range [0; 1]

1 means that the window is unchanged, 0 means that it's completely black. 0.5 would make it 50% darker than usual

See also setBrightness().

qreal WindowPaintData::crossFadeProgress() const

See also setCrossFadeProgress.

qreal WindowPaintData::multiplyBrightness(qreal factor)

Multiplies the current brightness level with factor.

factor with which the brightness should be multiplied.

Returns the new brightness level

qreal WindowPaintData::multiplyOpacity(qreal factor)

Multiplies the current opacity with the factor.

factor Factor with which the opacity should be multiplied

Returns the new opacity level

qreal WindowPaintData::multiplySaturation(qreal factor)

Multiplies the current saturation with factor.

factor with which the saturation should be multiplied

Returns the new saturation level

qreal WindowPaintData::opacity() const

Window opacity, in range 0 = transparent to 1 = fully opaque

See also setOpacity.

qreal WindowPaintData::saturation() const

Saturation of the window, in range [0; 1]

1 means that the window is unchanged, 0 means that it's completely unsaturated (greyscale). 0.5 would make the colors less intense, but not completely grey

Use EffectsHandler::saturationSupported() to find out whether saturation is supported by the system, otherwise this value has no effect.

Returns the current saturation

See also setSaturation().

void WindowPaintData::setBrightness(qreal brightness)

Sets the window brightness level to brightness.

If you want to modify the existing brightness level consider using multiplyBrightness.

brightness The new brightness level

See also brightness().

void WindowPaintData::setCrossFadeProgress(qreal factor)

Sets the cross fading factor to fade over with previously sized window.

If 1.0 only the current window is used, if 0.0 only the previous window is used.

By default only the current window is used. This factor can only make any visual difference if the previous window get referenced.

factor The cross fade factor between 0.0 (previous window) and 1.0 (current window)

See also crossFadeProgress.

void WindowPaintData::setOpacity(qreal opacity)

Sets the window opacity to the new opacity.

If you want to modify the existing opacity level consider using multiplyOpacity.

opacity The new opacity level

See also opacity().

void WindowPaintData::setSaturation(qreal saturation) const

Sets the window saturation level to saturation.

If you want to modify the existing saturation level consider using multiplySaturation.

saturation The new saturation level

See also saturation().

KWin::WindowPaintData &WindowPaintData::operator*=(const QVector2D &scale)

Scales the window by scale factor.

Performs a component wise multiplication on x and y components.

KWin::WindowPaintData &WindowPaintData::operator*=(const QVector3D &scale)

Scales the window by scale factor.

Performs a component wise multiplication.

KWin::WindowPaintData &WindowPaintData::operator*=(qreal scale)

Scales the window by scale factor.

Multiplies all three components by the given factor.

KWin::WindowPaintData &WindowPaintData::operator+=(const QPoint &translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData.

Overloaded method for convenience.

KWin::WindowPaintData &WindowPaintData::operator+=(const QPointF &translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData.

KWin::WindowPaintData &WindowPaintData::operator+=(const QVector2D &translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData.

Overloaded method for convenience.

KWin::WindowPaintData &WindowPaintData::operator+=(const QVector3D &translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData.

Overloaded method for convenience.