image: Use convention that rotations is always CCW
This commit is contained in:
parent
2cfaf865c3
commit
341aef672e
10 changed files with 22 additions and 22 deletions
|
|
@ -239,7 +239,7 @@ impl imp::LpImage {
|
|||
#[weak]
|
||||
obj,
|
||||
move |gesture, _, _| {
|
||||
let angle = gesture.angle_delta().to_degrees();
|
||||
let angle = -gesture.angle_delta().to_degrees();
|
||||
|
||||
// Only reset rotation if scale gesture is locked in
|
||||
if let Some(Gesture::Scale) = obj.imp().locked_gestured.get() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2023-2024 Sophie Herold
|
||||
// Copyright (c) 2023-2025 Sophie Herold
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -249,7 +249,7 @@ impl imp::LpImage {
|
|||
));
|
||||
|
||||
// Apply the transformations from properties
|
||||
snapshot.rotate(rotation);
|
||||
snapshot.rotate(-rotation);
|
||||
if mirrored {
|
||||
snapshot.scale(-1., 1.);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2023-2024 Sophie Herold
|
||||
// Copyright (c) 2023-2025 Sophie Herold
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -78,9 +78,9 @@ impl LpImage {
|
|||
let orientation = self.metadata().orientation();
|
||||
self.imp()
|
||||
.rotation_target
|
||||
.set(-(orientation.rotate().degrees() as f64));
|
||||
.set(orientation.rotate().degrees() as f64);
|
||||
self.set_mirrored(orientation.mirror());
|
||||
self.set_rotation(-(orientation.rotate().degrees() as f64));
|
||||
self.set_rotation(orientation.rotate().degrees() as f64);
|
||||
}
|
||||
|
||||
pub fn rotate_by(&self, angle: f64) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue