-
-
Notifications
You must be signed in to change notification settings - Fork 395
Feature: Mirror Selection Tool #1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Not currently planned
There might be some jankiness because of this. I think it makes sense not to have it for textstrokes but maybe we need to adapt some things here.
I think that can be done to refactor/condense this down a little later.
Do you have a crash message for this ? Does it crash on a specific stroke type ? If it's relatively easy to fix maybe it's worth trying (though I'm not 100 % sure all stroke types would magically work with this) Feedback
I agree with this. I think it makes more sense to do negative resizing than adding the mirror tool on the selection. One additional thing is that the selector panel is starting to get a little crowded. Two more icons, and maybe an additional one down the line with #1428. One button I'm using a lot in the selector is the delete button and I'm not sure it won't get out of bounds with this. Maybe we're gonna have to reorder things a little bit, add separators, or submenus ? |
Very good ! I've tested exporting as well just in case to all formats and this works too.
I'm adding @flxzt to discuss the remaining questions. |
Good idea, what do we think for keys?
I'll experiment with text mirroring with the functionality as described in my recent reply.
I think it makes most sense to reorganize the selection menu as a separate PR, as that could include other fixes that significantly differ functionally from mirroring, most notably #155. I'd be interested in working on it right after this though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's only a minor fix to do for gettext here. After the fix I'll run the CI one more time (to check/listen to clippy)
At some point I imagined toggling the button's sensitivity in the toolbar based on context (on each selection update) so you wouldn't be able to click as soon as a text element would be in the selection. Haven't totally though out the mechanism though ...
But I'm pretty satisfied with the popup method so all is good.
Yeah I wasn't sure how to do this on the UI side so I went with the popup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visual debug hitboxes only updating on a pen up event is an optimization : do not regenerate the hitboxes when we are only moving the strokes. As there are primarly used by the different selector to determine what strokes are selected, and we can't create a new selection in the middle of dragging an element, it makes sense to defer the computation to the pen up event.
Not updating the stroke geometry breaks the 4th Select Intersecting Path
selection mode here
Screencast_20250827_200034.webm
Fix #207 by adding a horizontal and vertical mirroring tool that operates on the actively selected elements
Basic required functionality
Planned: Mirroring images
Demo
mirror_demo.mp4
mirror_images.mp4
Not currently planned
Altering theTransformable
trait to include a mirror function as a basic geometric transformation. I think this would be the best way to scale the mirroring functionality to new features, however it would be a tremendous undertaking and as of writing I'm not confident I could pull it off. Again, I want to focus on getting the feature implemented and workingTransformable
functions, butscale()
would instantly crash if the x and y scalings had different signs, so I moved on from that ideaFeedback
Some things I'm not sure about yet and want to discuss: