feat(svg-editor): Implement SVG shape loading and editing functionality
- Add SVG shape loading from disk, allowing users to customize shapes by placing SVG files in the designated directory. - Introduce a new `ShapeCatalog` to manage SVG shapes, prioritizing user-defined shapes over built-in templates. - Implement an SVG editor with node-based editing capabilities, enabling users to manipulate SVG paths directly. - Create a new `SvgEditable` structure to represent editable SVG shapes, supporting operations like adding, removing, and moving nodes. - Enhance the GUI with an SVG editor panel for visual editing of SVG shapes, including controls for node manipulation and saving changes. - Ensure compatibility with existing shape tools and maintain a seamless user experience across the application.
This commit is contained in:
@@ -43,6 +43,7 @@ pub enum Tool {
|
||||
AiObjectRemoval,
|
||||
SmartSelect,
|
||||
VisionSelect,
|
||||
CustomShape(u32),
|
||||
}
|
||||
|
||||
impl Tool {
|
||||
@@ -100,6 +101,7 @@ impl Tool {
|
||||
Tool::AiObjectRemoval => "AI Object Removal",
|
||||
Tool::SmartSelect => "Smart Select",
|
||||
Tool::VisionSelect => "Vision Tools",
|
||||
Tool::CustomShape(_) => "Custom Shape",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +143,7 @@ impl Tool {
|
||||
Tool::AiObjectRemoval => "🪄",
|
||||
Tool::SmartSelect => "🎯",
|
||||
Tool::VisionSelect => "👁",
|
||||
Tool::CustomShape(_) => "○",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +190,7 @@ impl Tool {
|
||||
Tool::VectorPolygon | Tool::VectorRhombus | Tool::VectorCylinder |
|
||||
Tool::VectorHeart | Tool::VectorBubble | Tool::VectorGear |
|
||||
Tool::VectorCross | Tool::VectorCrescent | Tool::VectorBolt |
|
||||
Tool::VectorArrow4
|
||||
Tool::VectorArrow4 | Tool::CustomShape(_)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user