Merge branch 'main' into hefty-hype

This commit is contained in:
end-4
2026-04-08 10:23:53 +02:00
@@ -274,6 +274,17 @@ Item {
property real unscaledY: boundingVertices[0].y
property real unscaledWidth: boundingVertices[1].x - boundingVertices[0].x
property real unscaledHeight: boundingVertices[3].y - boundingVertices[0].y
// Calculate rotation based on first two vertices (top-left to top-right)
property real dx: boundingVertices[1].x - boundingVertices[0].x
property real dy: boundingVertices[1].y - boundingVertices[0].y
transformOrigin: Item.TopLeft
rotation: {
// Note rotation in qml is degrees clockwise
var angle = Math.atan2(dy, dx) * 180 / Math.PI;
return angle;
}
x: unscaledX * scaleFactor
y: unscaledY * scaleFactor
width: unscaledWidth * scaleFactor