Skip to content

Commit

Permalink
visual tools: Fix grid in RotateXY tool
Browse files Browse the repository at this point in the history
Fix the grid scaling when the video is not at 100% zoom, and scale the
grid with \fscx / \fscy .
  • Loading branch information
arch1t3cht committed Jan 14, 2023
1 parent ddfd450 commit 4c2b47d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/visual_tool_rotatexy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

0 comments on commit 4c2b47d

Please sign in to comment.