mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-02 14:16:56 -06:00
Path Precision Tools gains the Parametric Shape Tool: ten kinds of shape (rectangle, ellipse, polygon, star, ring, arrow, cross, heart, gear, speech bubble) that stay editable as numbers. - Geometry in vectorcraft_pathops::addons::pathtools::shapes: each kind's outline, corner rounding limited to the middle of a side, a fingerprint of the outline, recovery of centre, size and rotation after a move, turn or scale, and recognition of plain rectangles, ellipses and regular polygons. - The tool (parametricShape, All Tools drawer and Object › Plug-ins › Path Precision Tools only, no shortcut): drag from the centre (Shift: 45° steps), arrow keys change the count and values while dragging, handles edit a selected shape, double-click places one. - Commands addon.pathtools.shape.create / .set / .convert, one undo step each; params checked (counts 3..1000, sizes up to 16384 pt). - A shape keeps its numbers in one object-data entry (vc-pathtools-shape) that SVG export already leaves out; anchor edits make it a plain path. - Parametric Shape panel, cursor stand-in, catalog rows in all 25 languages, docs and tests.
24 lines
1.2 KiB
Rust
24 lines
1.2 KiB
Rust
//! Geometry for VectorCraft's built-in add-ons, one module per add-on, with the kernels they share.
|
|
//!
|
|
//! - [`keep_shape`]: remove anchors while refitting their neighbours' handles, so the outline keeps
|
|
//! its shape within a tolerance (shared by every add-on that takes anchors away).
|
|
//! - [`cleanup`]: Artwork Cleanup's path repairs (collinear, duplicate and near anchors, tiny
|
|
//! handles, nearly closed paths) and Rejoin Path Pieces.
|
|
//! - [`pathtools`]: Path Precision Tools' anchor edits, path readouts, extending open paths,
|
|
//! finding where paths cross and the Parametric Shape Tool's re-editable shapes.
|
|
//! - [`segment_reshape`]: bending a segment by dragging a point on it (shared by the tools that
|
|
//! reshape segments directly).
|
|
//! - [`pen`]: the Smart Pen's straight and curved segments and its point edits.
|
|
|
|
pub mod cleanup;
|
|
pub mod keep_shape;
|
|
pub mod pathtools;
|
|
pub mod pen;
|
|
pub mod segment_reshape;
|
|
|
|
pub use cleanup::{
|
|
Rejoined, close_nearly_closed, merge_duplicate_anchors, near_point_groups, rejoin, remove_collinear_anchors, retract_tiny_handles,
|
|
};
|
|
pub use keep_shape::{SHARP_CORNER_DEG, remove_anchor_keep_shape, simplify_anchors_keep_shape, simplify_keep_shape};
|
|
pub use segment_reshape::{ReshapeMode, reshape_segment};
|