From 5caa24d7d6ffb9a214199a33e4c0a0a5ff015673 Mon Sep 17 00:00:00 2001 From: avee12x2 Date: Mon, 17 Mar 2025 21:13:30 +0530 Subject: [PATCH] Fix control handle rendering with flipped canvas The control handles were rendering incorrectly when the canvas was flipped horizontally or vertically. This issue occurred because the handle rendering did not account for the flipped state of the canvas. Fixes: https://gitlab.com/inkscape/inkscape/-/issues/5278 --- src/display/control/canvas-item-ctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/control/canvas-item-ctrl.cpp b/src/display/control/canvas-item-ctrl.cpp index d38322fb5d..65a3566665 100644 --- a/src/display/control/canvas-item-ctrl.cpp +++ b/src/display/control/canvas-item-ctrl.cpp @@ -379,7 +379,7 @@ void CanvasItemCtrl::_update(bool) case CANVAS_ITEM_CTRL_SHAPE_CARROW: case CANVAS_ITEM_CTRL_SHAPE_SALIGN: case CANVAS_ITEM_CTRL_SHAPE_CALIGN: { - double angle = int{_anchor} * M_PI_4 + angle_of(affine()); + double angle = (affine().flips() ? -1 : 1) * int{_anchor} * M_PI_4 + angle_of(affine()); double const half = width / 2.0; dx = -(half + 2) * cos(angle); // Add a bit to prevent tip from overlapping due to rounding errors. -- GitLab