mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 10:17:02 -06:00
Artboards: Artboard Options' Show Center Mark and Show Cross Hairs draw on the canvas
The Artboard Options help pages describe two display options (https://helpx.adobe.com/illustrator/desktop/create-manage-artboards/organize-manage-artboards/modify-display-settings-of-artboards.html, .../set-video-display-options-for-artboards.html): a mark at the artboard's center, and lines from the middle of each side through the center. The document already had show_center_mark and show_cross_hairs on Artboard, but nothing set or drew them. artboard.setProps (each `artboards` entry too) and artboard.new take showCenterMark and showCrossHairs as true/false, in the same single undo step as the other fields; a locked artboard can still change them. Artboard Options has both checkboxes, filled in from the artboard whether it opens from the panel or a double-click with the Artboard tool, and its New Artboard form passes them to artboard.new. The canvas draws them in the new theme token artboard_mark, 1 point wide on screen at any zoom: a cross 12 points across at the center whose arms follow the artboard's sides, and the two cross hairs. They are screen-only like the edges; exports and print never read the fields. inspect_document reports them when on. Saved files are unchanged: the two keys were already always written, so a document that never shows them saves byte for byte as before, and a file without the keys opens with both off. Video safe areas, video rulers and the pixel aspect ratio are not part of this change. Verification: artboard_display_marks_are_set_and_cleared_in_one_undo_step, artboard_display_marks_round_trip_through_the_native_format, artboard_display_marks_stay_out_of_exports (SVG and PDF identical with the marks on and off), an_artboard_shows_its_center_mark_and_cross_hairs (positions, screen-constant size under zoom, rotated view) and artboard_options_show_center_mark_and_cross_hairs. cargo xtask ci: all 10 steps passed.
This commit is contained in:
committed by
bflatastic
parent
08cfb45561
commit
64f6d2db50
+3
-1
File diff suppressed because one or more lines are too long
+8
-1
@@ -3000,7 +3000,7 @@ value: true}`; the Control bar's and Properties' Scale Artwork with Artboard che
|
||||
Artboard) makes its handle drags proportional and passes `scaleArt`, as do Properties' and the Transform panel's
|
||||
artboard size fields while the tool is in use.
|
||||
|
||||
`artboard.setProps {artboards: [{index, name?, color?, locked?, x?, y?, width?, height?}…], scaleArt?, moveArt?, …}` sets several
|
||||
`artboard.setProps {artboards: [{index, name?, color?, locked?, showCenterMark?, showCrossHairs?, x?, y?, width?, height?}…], scaleArt?, moveArt?, …}` sets several
|
||||
artboards in one undo step, each with its own fields; the other params apply to all of them. The art that moves or
|
||||
scales with each artboard is the art inside it before any of them changes, and an object inside several of them goes
|
||||
with the first one listed that moves or scales its art. An empty list and a list that names an artboard twice are
|
||||
@@ -3052,6 +3052,13 @@ artboard × paper / 255; artboards without a color show the paper color. The tra
|
||||
it shows. Copies, duplicates and the native format keep the color; exports and print do not draw it. `inspect_document`
|
||||
lists it as the artboard's `color` (`#rrggbb`), and `ui.colorPicker {artboard: index}` opens the Color Picker for it.
|
||||
|
||||
Artboard Options' Show Center Mark and Show Cross Hairs: `artboard.setProps {index, showCenterMark?: bool,
|
||||
showCrossHairs?: bool}` (or each entry of `artboards`) turns them on or off for that artboard in one undo step, and
|
||||
`artboard.new` takes them too. The canvas draws the center mark as a small cross at the artboard's center and the cross
|
||||
hairs as lines from the middle of each side through the center, 1 point wide on screen at any zoom; exports and print
|
||||
leave them out. Duplicates, copies and the native format keep them, and `inspect_document` adds `showCenterMark: true`
|
||||
and `showCrossHairs: true` to an artboard that shows them.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"artboard.copy","params":{"index":0}}}
|
||||
{"name":"run_command","arguments":{"command":"edit.paste","params":{}}}
|
||||
|
||||
File diff suppressed because one or more lines are too long
+3
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user