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:
Taha-Mahmoodi
2026-10-23 09:42:09 +07:00
committed by bflatastic
parent 08cfb45561
commit 64f6d2db50
39 changed files with 384 additions and 27 deletions
+2
View File
@@ -459,6 +459,8 @@ impl Tool for ArtboardTool {
Some(a) => {
let mut v = rect_json(self.active, a.rect);
v["name"] = json!(a.name);
v["showCenterMark"] = json!(a.show_center_mark);
v["showCrossHairs"] = json!(a.show_cross_hairs);
vec![Action::Dialog("artboardOptions".into(), v)]
}
None => vec![],