mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 05:58:06 +00:00
A built-in add-on under Object › Plug-ins › Smart Pen: - The Smart Pen Tool draws and edits Bézier paths without switching tools: a click adds the next segment straight or curved (a panel toggle; Tab flips the segment being placed or the last one), a drag makes a smooth point (Alt breaks the handle, Shift snaps to 45°, Space moves the point), a curve after a straight segment joins it tangent. - On existing paths it selects and moves points, removes a point keeping the shape (Alt-click), toggles smooth/corner (double-click), drags handles, reshapes a segment by dragging it and inserts a point on it (Alt-click); it closes, continues and joins open paths. - The Smart Pen panel: next segment straight or curved, remove points keeping shape, make smooth, make corner, retract handles, close or join. The tool stays out of both toolbars as shipped; the All Tools drawer lists it under the add-on's heading. Commands are addon.pen.*; the existing Pen tool, commands and menus are unchanged.
21 lines
635 B
Rust
21 lines
635 B
Rust
//! VectorCraft's built-in add-ons in the interface: each has a panel and a submenu at the top of
|
||
//! Object › Plug-ins, and acts through its engine commands (`addon.<name>.*`).
|
||
|
||
pub mod cleanup;
|
||
pub mod color;
|
||
pub mod pathtools;
|
||
pub mod pen;
|
||
|
||
use crate::menus::Item;
|
||
|
||
/// The add-ons' submenus, then a separator: the head of Object › Plug-ins.
|
||
pub fn plugin_menu() -> Vec<Item> {
|
||
vec![
|
||
Item::Sub("Artwork Cleanup", cleanup::menu()),
|
||
Item::Sub("Color Effects", color::menu()),
|
||
Item::Sub("Path Precision Tools", pathtools::menu()),
|
||
Item::Sub("Smart Pen", pen::menu()),
|
||
Item::Sep,
|
||
]
|
||
}
|