mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 02:21:53 +00:00
Live Paint: the Eyedropper, overprint, proxies and contents edits follow the whole-group rule
Follows #8685. The Eyedropper (appearance.copyFrom) onto a whole selected Live Paint group, or reversed onto a clicked one, wrote the picked appearance to every face, every edge and the hidden source paths. It now gives the fill attributes to the faces and the stroke attributes to the edges, and the source paths keep their paint. A whole-appearance pick gives each face every picked fill row and each edge every picked stroke row, and their other rows keep their order. With append, the faces and edges take the picked rows but not the picked object effects. A whole group picked up as the source gives its first face's fills with its first edge's strokes above them, and the group's own opacity, blend mode and effects. Appearance edits with target "contents" also reached the source paths and the parts of the other kind. The source paths are now left out of a Live Paint group's contents. appearance.addFill adds a fill to the faces only, and appearance.addStroke adds a stroke to the edges only. A fill or stroke edit of the contents with an item (stroke.set, paint.invert, paint.complement, gradient edits and object.setOverprint) goes to the parts of its kind. Overprint Fill and Overprint Stroke on a whole group also go to the faces and the edges. The Fill proxy and the Stroke panel showed a face's or edge's own paint when it was selected before its group. A part selected with its group, or with a group that holds its Live Paint group, now counts with the group, whatever the selection order. Docs: docs/mcp.md, params text, docs/target-app-parity.md.
This commit is contained in:
+24
-10
@@ -4740,15 +4740,23 @@ already walks Image Trace. Short agent entry points:
|
||||
`paint.none` paint the faces or the edges. `paint.editGradient`, `paint.setGradientGeom` and the `paint.freeform`
|
||||
point and line edits change the faces' or the edges' gradients, `paint.invert` and `paint.complement` recolor the
|
||||
faces' fills or the edges' strokes, and `stroke.set`, `stroke.weightUp`, `stroke.weightDown` and
|
||||
`stroke.setAdvanced` change the edges. The Fill proxy shows the faces' fill, and the Stroke proxy, the Stroke panel
|
||||
and the Control bar show the edges' stroke. A face or edge selected or given together with its whole group follows
|
||||
the group's rule: a fill does not reach an edge, and a stroke does not reach a face. `paint.swap` gives the faces
|
||||
the stroke the edges share and gives the edges the fill the faces share, with a gradient fitted to each face or
|
||||
edge. It leaves a group as it is when its faces' fills or its edges' strokes differ, when any of them is a freeform
|
||||
gradient, or when it has no face or no edge. `paint.default` replaces each face's appearance with no fill and each
|
||||
edge's appearance with a 0.5 pt black stroke, also when the document's Default Graphic Style is redefined. With
|
||||
only Live Paint groups selected or given, the fill and stroke for new art become no fill and a 0.5 pt black stroke;
|
||||
with New Art Has Basic Appearance off, new art then takes the selection's appearance, as after any command.
|
||||
`stroke.setAdvanced` change the edges. `object.setOverprint` sets the faces' fill overprint and the edges' stroke
|
||||
overprint. `appearance.copyFrom` (the Eyedropper) gives the picked fill attributes to the faces and the picked
|
||||
stroke attributes to the edges, also onto a group given as `source` with `reverse`. A whole-appearance pick gives
|
||||
each face every picked fill row and each edge every picked stroke row, and the faces and edges keep their rows of
|
||||
the other kind and their effects; `append` adds the source's rows to them but not its object effects. A whole group
|
||||
picked up as the source (given as `source`, or selected first with `reverse`) gives its first face's fills with its
|
||||
first edge's strokes above them, and the group's own opacity, blend mode and effects. The Fill proxy shows the
|
||||
faces' fill, and the Stroke proxy, the Stroke panel and the Control bar show the edges' stroke, whatever the order of
|
||||
a selection that holds the group, directly or inside a selected group, and some of its parts. A face or edge
|
||||
selected or given together with its whole group follows the group's rule: a fill does not reach an edge, and a
|
||||
stroke does not reach a face. `paint.swap` gives the faces the stroke the edges share and gives the edges the fill
|
||||
the faces share, with a gradient fitted to each face or edge. It leaves a group as it is when its faces' fills or its
|
||||
edges' strokes differ, when any of them is a freeform gradient, or when it has no face or no edge. `paint.default`
|
||||
replaces each face's appearance with no fill and each edge's appearance with a 0.5 pt black stroke, also when the
|
||||
document's Default Graphic Style is redefined. With only Live Paint groups selected or given, the fill and stroke
|
||||
for new art become no fill and a 0.5 pt black stroke; with New Art Has Basic Appearance off, new art then takes the
|
||||
selection's appearance, as after any command.
|
||||
|
||||
`brush.selectionArt {ids?|id?}` (a query) replies `{art}`: the object that `brush.new` given the same `ids` or `id`,
|
||||
or the same selection, takes as a new scatter or art brush's art and as a new pattern brush's side tile. Several
|
||||
@@ -5511,7 +5519,13 @@ fills and strokes above it paint over the members (characters), those below unde
|
||||
`contents` to say where the row ends up in the same undo step; `document.node` shows the slot as
|
||||
`appearance.contents_index`. The `appearance.*`, `effect.*` and `graphicStyle.apply` commands edit the selected
|
||||
objects themselves (a group's own stack; layers through `ids`) or, with `target: "contents"`, the objects inside the
|
||||
groups and layers. `appearance.targetContents` selects a group's members (double-clicking the Contents row).
|
||||
groups and layers. In a Live Paint group those are its faces and edges, not its hidden source paths.
|
||||
`appearance.addFill` adds a fill to the faces only, and `appearance.addStroke` adds a stroke to the edges only. A
|
||||
fill or stroke command with an `item` and `target: "contents"` (such as `paint.setFill`, `stroke.set`,
|
||||
`paint.invert`, `paint.setGradientGeom` and `object.setOverprint`) changes the faces for a fill row and the edges for
|
||||
a stroke row. The row commands (`appearance.setItem`, `appearance.removeItem` and the others) find their rows on each
|
||||
face and edge as on any other object in the contents.
|
||||
`appearance.targetContents` selects a group's members (double-clicking the Contents row).
|
||||
SVG and PDF export bake a group's own fills, strokes and geometry effects into paths; its raster effects stay a
|
||||
filter on the whole group in SVG and become an image of the whole group in PDF.
|
||||
A geometry effect on one of type's own fills or strokes (`effect.apply` with `item`) reshapes the whole outline that
|
||||
|
||||
@@ -1892,7 +1892,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
As VectorCraft's own rule, OK in Live Paint Selection Tool Options, Live Paint Bucket Options, Gap Options and Tile Edge Color gives an error for a color with an alpha part (`#rrggbbaa` or `#rgba`) and changes nothing.
|
||||
As VectorCraft's own rule, a Live Paint edit that changes nothing records no undo step, keeps the redo steps and leaves a saved document saved: a Live Paint Bucket click or drag over faces that already have the fill, a stroke on an edge that already has the paint and weight, Gap Options OK with the options the groups have and no gap to close, and Make or Merge with one Live Paint group alone. Such a fill or stroke also leaves the recent colors as they are. Regression tests: `live_paint_fill_same_paint_is_no_op`, `live_paint_bucket_click_with_the_face_paint_is_no_op`, `live_paint_stroke_edge_same_paint_and_width_is_no_op`, `live_paint_gap_options_same_values_are_no_op`, `live_paint_gap_options_close_without_gaps_is_no_op`, `live_paint_make_existing_group_is_no_op` and `live_paint_merge_single_group_is_no_op` in `crates/engine/src/tests/build.rs`, and `ok_on_unchanged_options_records_no_undo_step` in `crates/ui-egui/src/dialogs/live_paint_gaps.rs`.
|
||||
As VectorCraft's own rule, the Live Paint Bucket replaces all of a face's fills, or all of an edge's strokes, with one fill or stroke of the paint, shown, fully opaque and blending normally, so a lower fill or stroke no longer draws under the new paint and a fill or stroke of none leaves nothing of that kind drawing; the face's strokes, the edge's fills, the part's own opacity and the topmost shown stroke's dashes, caps and arrowheads stay as they are, and a part that already has only that one fill or stroke records no undo step. [The help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html) says the tool paints faces with the current fill and edges with the current stroke. Regression tests: `live_paint_bucket_replaces_every_fill_row`, `live_paint_stroke_edge_replaces_every_stroke_row` and `live_paint_stroke_edge_paints_the_shown_stroke` in `crates/engine/src/tests/build.rs`.
|
||||
As VectorCraft's own rule, with a tool other than the Live Paint Bucket, a fill given to a whole selected Live Paint group paints its faces only and a stroke paints its edges only, and the hidden source paths keep their paint. Swap Fill and Stroke trades the fill the faces share with the stroke the edges share, and Default Fill and Stroke leaves the faces with no fill and gives the edges a 0.5 pt black stroke (`docs/mcp.md`). Evidence: `tests::build::{live_paint_group_fill_goes_to_faces_and_stroke_to_edges, live_paint_group_swap_trades_the_faces_fill_and_the_edges_stroke, live_paint_group_default_clears_the_faces_and_gives_the_edges_a_thin_black_stroke, live_paint_group_invert_recolors_the_faces_fill, live_paint_group_gradient_vector_and_freeform_edits_change_its_faces, live_paint_group_stroke_panel_edits_change_its_edges, live_paint_group_rules_stop_where_paint_commands_stop, live_paint_group_without_parts_of_the_edited_kind_leaves_new_art_alone}`.
|
||||
As VectorCraft's own rule, with a tool other than the Live Paint Bucket, a fill given to a whole selected Live Paint group paints its faces only and a stroke paints its edges only, and the hidden source paths keep their paint. Swap Fill and Stroke trades the fill the faces share with the stroke the edges share, and Default Fill and Stroke leaves the faces with no fill and gives the edges a 0.5 pt black stroke (`docs/mcp.md`). The Eyedropper gives the picked fill attributes to the faces and the picked stroke attributes to the edges, and picks up a whole group as its first face's fills with its first edge's strokes. Overprint Fill goes to the faces and Overprint Stroke goes to the edges. The proxies show the same paint whatever the order of a selection that holds the group and one of its parts. Appearance panel edits of the group's contents leave the hidden source paths as they are, a new fill goes on the faces, and a new stroke goes on the edges. Evidence: `tests::build::{live_paint_group_fill_goes_to_faces_and_stroke_to_edges, live_paint_group_swap_trades_the_faces_fill_and_the_edges_stroke, live_paint_group_default_clears_the_faces_and_gives_the_edges_a_thin_black_stroke, live_paint_group_invert_recolors_the_faces_fill, live_paint_group_gradient_vector_and_freeform_edits_change_its_faces, live_paint_group_stroke_panel_edits_change_its_edges, live_paint_group_rules_stop_where_paint_commands_stop, live_paint_group_without_parts_of_the_edited_kind_leaves_new_art_alone, live_paint_group_proxies_do_not_depend_on_the_selection_order, live_paint_group_eyedropper_gives_the_fill_to_faces_and_the_stroke_to_edges, live_paint_group_eyedropper_gives_every_fill_and_stroke_row, live_paint_group_contents_edits_follow_the_group_rule, live_paint_group_item_edits_and_overprint_follow_the_group_rule, live_paint_group_inside_a_selected_group_keeps_the_proxies_independent_of_order, live_paint_group_eyedropper_picks_up_the_group_and_appends_without_effects}`.
|
||||
As VectorCraft's own rule, `tool.setOption` for the Live Paint Bucket and the Live Paint Selection tool, chosen or not, checks every value before it sets any: a switch that is not `true` or `false`, a `color` that is not an RGB color or a layer color's name, or that has an alpha part, a `width` that is not a number and an option the tool does not have give an error naming the option, and nothing is set or saved. A `width` outside 1 to 20 px is still set to the nearest end of that range. Saved settings that hold an invalid value still load, and the tool keeps its default for that option. Evidence: `tests::build::{live_paint_tool_options_refuse_invalid_values_and_change_nothing, live_paint_tool_options_take_rgb_colors_and_clamp_the_width, live_paint_tools_load_saved_settings_with_invalid_values}`.
|
||||
As VectorCraft's own rule, `tool.setOption` for the Shape Builder, chosen or not, checks every value the same way: a switch that is not `true` or `false`, a `pickColorFrom` or `selection` that is not one of its names, a `gapLength` that is not a number, a `highlightColor` that is not an RGB color or a layer color's name, or that has an alpha part, and an option the tool does not have give an error naming the option, and nothing is set or saved. A `gapLength` outside 0 to 72 pt is still set to the nearest end of that range. Evidence: `tests::build::{shape_builder_tool_options_refuse_invalid_values_and_change_nothing, shape_builder_tool_options_take_valid_values_and_clamp_the_gap}`.
|
||||
A drag of 3 screen pixels or more with the Live Paint Selection tool draws a marquee and selects the faces and edges it touches, partly enclosed ones included, and a Shift-drag adds them to the selection or removes them from it ([Modify Live Paint groups](https://web.archive.org/web/20261006115247/https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/modify-live-paint-groups.html)). A click and a marquee change the selection on release, and Escape before the release leaves the selection as it was. Locked Live Paint groups, those on a locked layer or artboard, and in isolation mode those outside the isolated art are not highlighted or selected.
|
||||
|
||||
Reference in New Issue
Block a user