Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool (#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>
This commit is contained in:
0SlowPoke0
2025-06-22 00:53:49 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent e520c21b66
commit 8e5abf65cb
34 changed files with 3231 additions and 2137 deletions
+6 -12
View File
@@ -32,13 +32,7 @@ pub enum ToolMessage {
#[child]
Spline(SplineToolMessage),
#[child]
Line(LineToolMessage),
#[child]
Rectangle(RectangleToolMessage),
#[child]
Ellipse(EllipseToolMessage),
#[child]
Polygon(PolygonToolMessage),
Shape(ShapeToolMessage),
#[child]
Text(TextToolMessage),
@@ -62,7 +56,6 @@ pub enum ToolMessage {
ActivateToolArtboard,
ActivateToolNavigate,
ActivateToolEyedropper,
ActivateToolText,
ActivateToolFill,
ActivateToolGradient,
@@ -70,10 +63,11 @@ pub enum ToolMessage {
ActivateToolPen,
ActivateToolFreehand,
ActivateToolSpline,
ActivateToolLine,
ActivateToolRectangle,
ActivateToolEllipse,
ActivateToolPolygon,
ActivateToolShapeLine,
ActivateToolShapeRectangle,
ActivateToolShapeEllipse,
ActivateToolShape,
ActivateToolText,
ActivateToolBrush,
// ActivateToolImaginate,