mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 13:32:45 -05:00
Arrange Tools: Add Artboard Guides keeps its artboard and matches guides with extra anchors
The dialog keeps the opening artboard's id and resolves its index for Preview and OK, so reordering artboards while it is open no longer moves the guide to another artboard, and a deleted artboard is an error with no undo step. A guide rectangle with collinear anchors along its sides counts as the same rectangle. Each run walks the guides layer once. The dialog's menu item is available without a selection.
This commit is contained in:
1 parent
e33a621327
commit
75d3fbca62
7 files changed
+232
-31
No files matched your search
@@ -17990,6 +17990,11 @@ with strokes and vector effects included and raster effects left out (see its ro
|
||||
| `addon.arrange.artboardGuides` | `offset` pt −1000000…1000000 (0: on the artboard's edges; more than 0 outside them, less than 0 inside); `artboards` [index…] (0-based; the active artboard); `artboard` index (the active artboard, which the app passes; the view's when left out, and the journal then records it for a replay); `all` (false; true: every artboard; not with `artboards`) | Adds a rectangular guide path around each of those artboards, `offset` from its edges, on the topmost top-level layer named Artboard Guides (made above the other layers when there is none; it keeps its lock and visibility). It acts on artboards, not on the selection. The guides have the current paint, which `view.guides.release` gives back with the path. A guide anywhere in that layer with the same rectangle is not added again, and a run that adds none makes no step. An inset that leaves an artboard no width or no height, and a guide edge more than 4,000,000 pt from the origin, are errors. Off without artboards. → `{ids, layer, skipped}` |
|
||||
| `addon.arrange.markBounds` | `style`: `corners`, `rectangle` (`corners`); `bounds`: `geometric` (strokes not counted), `visual` (strokes, brush art and effects as drawn) (`geometric`); `length` pt 0.001…1000000 (10, for `corners`); `weight` pt 0.01…1000 (1); `color` (`#ff0000`; an RGB color takes the document's color mode) | Draws marks on the bounds of each selected object (at most 20000), not around the whole selection: a group named Corner Marks of four L-shaped marks, one on each corner with its two legs running inward along the edges (each leg at most half the side it runs along), or a rectangle named Bounds. The marks have no fill and the stroke given, and go directly above their object, or above the outermost clip group or clipping sublayer that holds it. A clip group is measured by its clipping path and other groups by their members together. Guides and objects without bounds, such as empty groups, get no marks, and with `corners` neither does an object whose sides are too short for any leg; a selection with nothing to mark is an error that makes no step. The marks are selected. → `{ids, count}` |
|
||||
|
||||
`ui.menuDialog {command: "addon.arrange.artboardGuides"}` is available without a selection. The dialog keeps the
|
||||
opening artboard's id and resolves its current index for Preview and OK. If that artboard was deleted, Preview and
|
||||
OK report an error without adding a guide or an undo step. A guide with extra anchors along its sides counts as the
|
||||
same rectangle.
|
||||
|
||||
Zoom to Selection is the UI command `addon.arrange.zoomSelection {}` (remote mode only): it zooms and centres the
|
||||
active view so the selection's visual bounds fill the window with a margin, as `view.fitArtboard` fits the artboard,
|
||||
and fails with nothing selected. Add Artboard Guides… opens a dialog with Offset and Artboards (Active Artboard, or All
|
||||
|
||||
Reference in new issue
Block a user