image: Settle with either rotate or zoom gesture

Add thresholds after which the gesture is assumed to be
only zoom or rotate.

Closes #95, #29

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/145>
This commit is contained in:
Sophie Herold 2023-03-17 01:21:45 +01:00 • committed by Marge Bot
parent 7b7ece1dc3
commit 750fbfd305
2 changed files with 57 additions and 6 deletions

View file

@ -166,3 +166,10 @@ pub enum Direction {
Back,
Forward,
}
#[derive(Copy, Clone, Debug)]
pub enum Gesture {
/// Rotate with threshold offset
Rotate(f64),
Scale,
}