Skip to content
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

Tracking Issue: Pen and Path tool improvements #1870

Open
8 of 24 tasks
Keavon opened this issue Jul 29, 2024 · 7 comments · Fixed by #2058, #2065, #2160, #2180 or #2211
Open
8 of 24 tasks

Tracking Issue: Pen and Path tool improvements #1870

Keavon opened this issue Jul 29, 2024 · 7 comments · Fixed by #2058, #2065, #2160, #2180 or #2211
Assignees
Labels
Good First Issue Good for newcomers Paper Cut A small UX annoyance we should strive to improve

Comments

@Keavon
Copy link
Member

Keavon commented Jul 29, 2024

All of this is explained/demonstrated in this detailed webcast: https://youtu.be/OmveqhzXJFg

Path tool

When dragging a handle:

When dragging an anchor:

  • Alt Ctrl (updated since video was recorded) slides the anchor along its adjacent segment(s) while adjusting its handle(s) to best approximate the initial curvature
  • Alt (new since video was recorded) if held before the click-drag begins, converts the anchor's handles to smooth and drags the handle pair instead of the anchor using the "dragging a handle" mode above
  • Shift locks the drag to the nearer of the X or Y axes from its drag starting point (and should work whether or not the anchor is initially selected and whether or not the key is held before click-dragging)
    • (shouldn't interfere with Shift-clicking-and-releasing-without-dragging to add/remove the anchor to the selected points)

When a single handle is selected:

Pen tool

When placing a segment (pointer is up):

When dragging (pointer is down):

  • Alt stops keeping the handles equidistant while pressed, as long as they're currently colinear (otherwise it does nothing)
    • Exception: the reverse is the case (it keeps the handles equidistant while pressed) when the click-drag began with a single handle (either by click-dragging the current segment's connected anchor, click-dragging an endpoint of an existing not-yet-being-edited layer, or click-dragging the start point to close the shape) but Ctrl was pressed to keep
  • Ctrl locks the current angle of the handle (already implemented), but should also work to be colinear with the opposite handle if being dragged out of an existing anchor point, or if that anchor point has no handle then it should use the angle of the segment entering that handle)
  • Tab swaps to dragging the opposite handle (native: teleports the cursor / web: enters pointer lock and draws a fake cursor at the new location)
  • Space shifts the anchor (and handles) while pressed
  • C toggles bent vs. colinear handles (instead of the momentary Alt in use now)
  • If the current segment is closing the shape by connecting to its start point, the handle that's being dragged should be the closing handle, not a fake handle on the opposite side, and all the above shortcuts should work on that anchor/handle group spanning the start/end point (Tab will modify the shape of the first segment while the current/final segment is still in-progress)
  • All the above shortcuts should work with the "Bend Prev. Point" case where the current segment's connected anchor can be clicked to turn it sharp or click-dragged to bend its outgoing handle (turning its handles to not colinear), meaning C should be able to turn it back to colinear

  • Not yet figured out: improving the UX for extending an endpoint with a new segment, by having control to extend the handle on either end of the new segment instead of just the new endpoint's side, and by locking the angle of the new endpoint side's handle to avoid a discontinuity. Video.
@Keavon Keavon added Feature Good First Issue Good for newcomers Paper Cut A small UX annoyance we should strive to improve labels Jul 29, 2024
@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Jul 29, 2024
@vdawg-git
Copy link

Aight, I start with it. Wish me luck

@dzaima
Copy link

dzaima commented Oct 16, 2024

Here are some more potential additions (coming from features I found useful in an abandoned vector graphics editor I had been working on years ago; originally listed here):

  • shift+G/R/S (or some other modifier) for setting handle mode (bent, colinear, and colinear+equidistant respectively) is a potential intuitive keybind option kinda following what regular g/r/s do;
  • that handle mode can be displayed visually as different icons on the point (square for bent, rectangle aligned to angle for colinear, and perhaps circle for equidistant, though that may get confusing with handles being circles; ellipse?)
  • allow both rotate and scale at the same time (maybe never useful but I still had this ¯\_(ツ)_/¯)
  • middle-mouse-dragging while holding an element should ignore the delta mouse movement during the movement (currently doing this in Graphite results in jumpiness)
  • another option for visual indicators r/g/s:
    • g: a line from the starting mouse position in the canvas to where it'd be dragged to
    • s: line from the anchor point through the current and original mouse position with different colors (i.e. the ratio of the color lengths is the ratio of scaling)
    • r: lines from the anchor to original & current mouse position, with an arc in between (very busy-looking, don't quite like it)

Some general actions:

  • cut a path into two, snapping to cutting on an existing point if near enough (potentially, if dragging, could cut into three segments)
  • join paths if two end-points are selected (incl. closing a path)
  • select all points linked to currently already selected ones

screen recording showing some of these in my editor

@Keavon
Copy link
Member Author

Keavon commented Oct 16, 2024

Thank you for posting those here @dzaima! The feedback and ideas are very useful.

@github-project-automation github-project-automation bot moved this from Short-Term to Completed This Milestone in Task Board Oct 26, 2024
@Keavon Keavon reopened this Oct 26, 2024
@github-project-automation github-project-automation bot moved this from Completed This Milestone to In-Progress Tasks in Task Board Oct 26, 2024
@github-project-automation github-project-automation bot moved this from In-Progress Tasks to Completed This Milestone in Task Board Oct 30, 2024
@Keavon Keavon reopened this Oct 30, 2024
@github-project-automation github-project-automation bot moved this from Completed This Milestone to In-Progress Tasks in Task Board Oct 30, 2024
@DaraghD
Copy link
Contributor

DaraghD commented Oct 30, 2024

Hey, I plan working on the remaining few things for the path tool. I will be traveling for the next few weeks so wont be able to start anytime soon. Although if anyone else wants to pick them up before im back feel free!

@Keavon
Copy link
Member Author

Keavon commented Dec 23, 2024

@DaraghD hello again, I hope your travels were fruitful! Just wanted to see if you're interested in returning to some of the bullet points in this issue. In particular, the Pen tool ones aren't being attempted by anybody yet so those would be free to work on anytime you'd like, perhaps if you have some time over the holidays. Cheers!

@Keavon Keavon changed the title Pen and Path tool improvements Tracking Issue: Pen and Path tool improvements Dec 23, 2024
@Keavon Keavon moved this from In-Progress Tasks to In-Progress Projects in Task Board Dec 23, 2024
@bakayu
Copy link
Contributor

bakayu commented Dec 28, 2024

#2160 will add the following requested features-

  • Shift locks the handle angle to 15° increments
    • (shouldn't interfere with Shift-clicking handles for multi-selecting points such as handles)
  • Ctrl locks the current angle of the handle

@Keavon Keavon removed the Rust label Dec 30, 2024
@github-project-automation github-project-automation bot moved this from Ongoing Projects to Completed This Milestone in Task Board Dec 31, 2024
@Keavon Keavon reopened this Jan 2, 2025
@0SlowPoke0
Copy link
Contributor

completed #2180

@Keavon Keavon removed the Feature label Jan 19, 2025
@github-project-automation github-project-automation bot moved this from Ongoing Projects to Completed This Milestone in Task Board Jan 26, 2025
@Keavon Keavon reopened this Jan 26, 2025
@github-project-automation github-project-automation bot moved this from Completed This Milestone to Short-Term in Task Board Jan 26, 2025
@Keavon Keavon moved this from Short-Term to Ongoing Projects in Task Board Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment