Utils QML Type

Import Statement: import org.kde.kquickimageeditor

Methods

Detailed Description

Method Documentation

real clamp(real value, real min = infinity, real max = infinity)

Behaves like qBound, which behaves differently from std::clamp, but uses the same argument order as std::clamp.


real combinedScale(matrix4x4 matrix)


point dprRound(point value, real dpr)


real dprRound(real value, real dpr)


vector2d dprRound(vector2d value, real dpr)


Object handleResizeProperties(real dx, real dy, int edges, AnnotationDocument document)

Get a QVariantMap of properties for resizing an item in response to the movement of handles.

The map contains the effective handle edges so movement can be tracked properly and the QMatrix4x4 to be used that are positioned along the edges of the item's bounding box.

The dx should be the X axis difference between 2 points in document coordinates.

The dy should be the Y axis difference between 2 points in document coordinates.

The edges should be the bounding box edges a handle touches.

The document should be the AnnotationDocument with the item being transformed.


rect rectScaled(rect rect, real factor)


point sceneToDocumentPoint(point point, AnnotationViewport viewport)