Meshroom/meshroom/ui/qml/Controls/ExifOrientedViewer.qml
Candice Bentéjac 0e71f2a520 [qt6] Update versions for all the imported modules
Qt3D.Extras cannot be updated to 2.6 yet, otherwise there are errors.
2024-11-07 18:09:01 +01:00

31 lines
802 B
QML

import QtQuick
import Utils 1.0
/**
* Loader with a predefined transform to orient its content according to the provided Exif tag.
* Useful when displaying images and overlaid information in the Viewer2D.
*
* Usage:
* - set the orientationTag property to specify Exif orientation tag.
* - set the xOrigin/yOrigin properties to specify the transform origin.
*/
Loader {
property var orientationTag: undefined
property real xOrigin: 0
property real yOrigin: 0
transform: [
Rotation {
angle: ExifOrientation.rotation(orientationTag)
origin.x: xOrigin
origin.y: yOrigin
},
Scale {
xScale: ExifOrientation.xscale(orientationTag)
origin.x: xOrigin
origin.y: yOrigin
}
]
}