Add basic tranlation functionality to the viewer

Had to separate zoom and translate matrices to stop the zoom being
applied to itelf. This also required adding separate get/set functions
for each matrix and a GetcombinedMatrix() funtion.

Added those functions ot other files where needed ut may be wrong. Need
to look at export.cpp

Also changed the mouse move and press events to make translation work.
This commit is contained in:
Thomas Wilshaw
2020-06-16 11:53:34 +01:00
parent f107c9bba1
commit 2174100342
4 changed files with 62 additions and 11 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ void ViewerWindow::SetResolution(int width, int height)
mat.scale(1.0f, window_ar / image_ar, 1.0f);
}
display_widget_->SetMatrix(mat);
display_widget_->SetMatrixZoom(mat);
}
void ViewerWindow::Play(const int64_t& start_timestamp, const int& playback_speed, const rational &timebase)