From 4c2b47d5de39cf253956cf640db4793e5641ae80 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Sat, 14 Jan 2023 14:20:24 +0100 Subject: [PATCH] visual tools: Fix grid in RotateXY tool Fix the grid scaling when the video is not at 100% zoom, and scale the grid with \fscx / \fscy . --- src/visual_tool_rotatexy.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/visual_tool_rotatexy.cpp b/src/visual_tool_rotatexy.cpp index acb389acd..98ae6f1a0 100644 --- a/src/visual_tool_rotatexy.cpp +++ b/src/visual_tool_rotatexy.cpp @@ -49,7 +49,9 @@ void VisualToolRotateXY::Draw() { // Transform grid gl.SetOrigin(org->pos); + gl.SetScale(100 * video_res / script_res); gl.SetRotation(angle_x, angle_y, angle_z); + gl.SetScale(fsc); gl.SetShear(fax, fay); // Draw grid @@ -197,4 +199,5 @@ void VisualToolRotateXY::DoRefresh() { GetLineRotation(active_line, angle_x, angle_y, angle_z); GetLineShear(active_line, fax, fay); + GetLineScale(active_line, fsc); }