summaryrefslogtreecommitdiff
path: root/src/editing_tools/StraightenTool.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
commit31804433d72460cbe0a39f9f8ea5e76058d84cda (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /src/editing_tools/StraightenTool.vala
parenta9898fb3f39c44a85876930ef6b2558052569ae6 (diff)
parentd443a3c2509889533ca812c163056bace396b586 (diff)
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1' with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'src/editing_tools/StraightenTool.vala')
-rw-r--r--src/editing_tools/StraightenTool.vala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/editing_tools/StraightenTool.vala b/src/editing_tools/StraightenTool.vala
index f427b99..2b0591a 100644
--- a/src/editing_tools/StraightenTool.vala
+++ b/src/editing_tools/StraightenTool.vala
@@ -80,13 +80,13 @@ public class StraightenTool : EditingTool {
// different backgrounds.
ctx.set_source_rgba(0.0, 0.0, 0.0, alpha);
ctx.set_dash(GUIDE_DASH, GUIDE_DASH[0] / 2);
- ctx.move_to(x[0] + 0.5, y[0] + 0.5);
- ctx.line_to(x[1] + 0.5, y[1] + 0.5);
+ ctx.move_to(x[0] * Application.get_scale() + 0.5, y[0]* Application.get_scale() + 0.5);
+ ctx.line_to(x[1] * Application.get_scale()+ 0.5, y[1]* Application.get_scale() + 0.5);
ctx.stroke();
ctx.set_dash(GUIDE_DASH, -GUIDE_DASH[0] / 2);
ctx.set_source_rgba(1.0, 1.0, 1.0, alpha);
- ctx.move_to(x[0] + 0.5, y[0] + 0.5);
- ctx.line_to(x[1] + 0.5, y[1] + 0.5);
+ ctx.move_to(x[0] * Application.get_scale()+ 0.5, y[0]* Application.get_scale() + 0.5);
+ ctx.line_to(x[1] * Application.get_scale()+ 0.5, y[1] * Application.get_scale()+ 0.5);
ctx.stroke();
}
}
@@ -456,7 +456,7 @@ public class StraightenTool : EditingTool {
*/
private void update_rotated_surface() {
draw_rotated_source(photo_surf, rotate_ctx, view_width, view_height, photo_angle);
- rotate_ctx.set_line_width(1.0);
+ rotate_ctx.set_line_width(1.0 * Application.get_scale());
draw_superimposed_grid(rotate_ctx, view_width, view_height);
}
@@ -468,8 +468,8 @@ public class StraightenTool : EditingTool {
* it's not used.
*/
public override void paint(Cairo.Context ctx) {
- int w = canvas.get_drawing_window().get_width();
- int h = canvas.get_drawing_window().get_height();
+ var w = canvas.get_drawing_window().get_width() * Application.get_scale();
+ var h = canvas.get_drawing_window().get_height() * Application.get_scale();
// fill region behind the rotation surface with neutral color.
canvas.get_default_ctx().identity_matrix();