Rotate/resize the transform tools with a rectangle handle (fixes #585) - #2239
Open
zbcoding wants to merge 1 commit into
Open
Rotate/resize the transform tools with a rectangle handle (fixes #585)#2239zbcoding wants to merge 1 commit into
zbcoding wants to merge 1 commit into
Conversation
4 tasks
zbcoding
force-pushed
the
feature/rotate-scale-transform-handles
branch
2 times, most recently
from
July 29, 2026 09:39
f9fe7d1 to
21aba09
Compare
…aProject#585) Completes the checklist from the draft PR PintaProject#1515 by wiring RectangleHandle into BaseTransformTool so the Move Selected/Selection tools expose grips: - Use the rectangle handle to control scaling, anchored to the opposite corner (or edge) instead of the center; Ctrl anchors to the center. - Dragging to translate (mouse or arrow keys) keeps the handles glued to the moved region. - Rotations rotate the handles too: a live orientation matrix maps a fixed reference rect onto the current on-screen quad, and grip drags are mapped back through its inverse so rotated content scales along its own axes with the opposite oriented corner pinned and no shear. - Shift constrains to the content's original aspect ratio rather than to a square. Also draggable corners can flip/mirror the content when pulled past the opposite edge, and holding a modifier over a grip shows a hint. Arrow keys nudge (Shift = 10px, Ctrl = 10% of canvas) with a hint after a short hold (issue PintaProject#1559). Adds a high-contrast bidirectional rotate cursor icon. Credit: cameronwhite (draft PR PintaProject#1515, refactor PR PintaProject#1712) and marcovr (master...marcovr:Pinta:allow-handle-resize) for the handle-resize approach this builds on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
zbcoding
force-pushed
the
feature/rotate-scale-transform-handles
branch
from
July 29, 2026 10:35
21aba09 to
d1171aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This picks up the draft #1515 (thanks @cameronwhite) and completes its checklist. All four items are implemented:
Shiftconstrains to the original aspect ratio, not to a square.How rotation of the handles works
A live orientation matrix maps a fixed reference rect onto the current on-screen quad, so the 8 grips draw and hit-test at the rotated corner/edge positions. A grip drag is mapped back through the inverse of that matrix, the resize is computed in the reference frame (reusing the corner/edge/flip/aspect math), and re-applied as
g = live · s · live⁻¹— so rotated content scales along its own axes with the opposite oriented corner pinned and no shear.liveonly ever composes rotation + reference-axis scale + translation, so it always maps to a proper (non-sheared) rectangle.Extras beyond the #1515 checklist
Shift= 10px,Ctrl= 10% of canvas) with a hint popover after a short hold (issue Arrow keys should move selection by 10 pixels with Shift #1559).Credit
Builds on the handle-resize approach from @cameronwhite (#1515, #1712) and @marcovr (
master...marcovr:Pinta:allow-handle-resize).Testing
Builds clean (0 warn / 0 err). The rotated-frame scaling math is covered by a standalone self-check against the real Cairo matrix binding (opposite corner stays fixed, dragged corner follows the mouse, handles stay glued, quad stays rectangular). Smoke-tested manually in the app; I'd appreciate maintainer review of the interaction feel and edge cases.
Fixes #585.