Skip to content

Conversation

@0SlowPoke0
Copy link
Collaborator

@0SlowPoke0 0SlowPoke0 commented Jun 1, 2025

Replaced the existing Line, Rectangle, Ellipse, and Polygon tools with a unified Shape Tool that supports the creation of all these shapes from a single interface. The old Line, Rectangle, and Ellipse tools have been aliased to use the new Shape Tool. In addition to shape creation, the new tool also supports modifying the shapes it creates.

Closes #2618, closes #1715

@Keavon Keavon changed the title Refactor Line, Rectangle, Ellipse, and Polygon Tools into a Unified Shape Tool Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool Jun 4, 2025
@Keavon Keavon changed the title Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool and add gizmos Jun 22, 2025
@Keavon Keavon force-pushed the shapes-refactor branch from 4f71b2b to 7105e33 Compare June 22, 2025 07:20
@Keavon
Copy link
Member

Keavon commented Jun 22, 2025

Issues to address in followup work:

  • After drawing any shape (except Line, apparently), or even after just hovering over the transform cage to change the cursor appearance, the crosshair cursor goes back to the regular mouse pointer. It doesn't return to the crosshair like it's supposed to indicating it will draw the next shape. (A regular mouse pointer, not a crosshair, is desired over the point radius handle gizmos.)
  • Dragging a polygon or star's radius point gizmos happens at an accelerated/slowed pace rather than staying with your cursor as you drag, if that shape has a Transform node scale other than 1x.

@Keavon Keavon changed the title Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool and add gizmos Refactor the separate shape drawing tools into a unified Shape tool and add gizmos for star/polygon Jun 22, 2025
@Keavon Keavon force-pushed the shapes-refactor branch from 7105e33 to 0813643 Compare June 22, 2025 07:44
@Keavon Keavon changed the title Refactor the separate shape drawing tools into a unified Shape tool and add gizmos for star/polygon Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool Jun 22, 2025
@Keavon Keavon merged commit 8e5abf6 into master Jun 22, 2025
4 checks passed
@Keavon Keavon deleted the shapes-refactor branch June 22, 2025 07:53
urisinger pushed a commit to urisinger/Graphite that referenced this pull request Jul 15, 2025
… into a unified Shape tool (GraphiteEditor#2683)

* no trait ,not to fix line

* add hints

* line modification even when other shapes are selected

* added transform and anchor overlays

* removed old code

* fixed transform added hints need to fix modifier keys use

* refactored select-tool

* add point-handle-gizmo

* fix rotate bug

* implement angle snapping gizmo , fix overlay and refactor the code

* implement snapping for point-handle gizmo and implement no of point gizmo need to refactor

* implemented the gizmo for polygon, added tests , brackets to increase sides

* formatting-fix

* small nit-picks

* Make it compile

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjusting the Polygon/Star tool number of points while drawing Shape tools should allow modifying their drawn shapes

3 participants