Make gizmos work with translated/zoomed image

Added a new function that inverts the world transform and applies it to
a point. This allows the gizmo code to work in it's own space and not
need to know is the image has been zoomed or translated.
This commit is contained in:
Thomas Wilshaw
2020-06-21 19:31:40 +01:00
parent 1c6aebdcbe
commit ccb6efd6b6
2 changed files with 16 additions and 2 deletions
+2
View File
@@ -93,6 +93,8 @@ public:
*/
QTransform GenerateWorldTransform();
QPoint TransformViewerSpaceToGizmoSpace(QPoint pos);
public slots:
/**
* @brief Set the transformation matrix to draw with