mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 09:36:45 +00:00
Live Paint: a Bucket drag from an edge strokes every edge it crosses
A press on an edge (Shift with Paint Fills alone, or a plain press with Paint Strokes on) now starts a drag, as a press on a face does. The drag paints the edge and every visible edge of the same group that it crosses or comes within 0.0001 pt of, between pointer events and on the release, as one undo step; Escape cancels it. Edges of other groups and hidden edges keep their strokes, a drag over edges that already have the stroke records no undo step, and a drag that starts on a face still fills only faces. A double-click after such a drag joins through the edges the drag stroked as the paint they had before it. livePaint.strokeEdge takes the drag's points and continuation as livePaint.fill does, and both refuse them with scope connected or samePaint. Help page: https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html
This commit is contained in:
+12
-6
@@ -4092,8 +4092,12 @@ already walks Image Trace. Short agent entry points:
|
||||
With `paintStrokes` alone on, a click runs `livePaint.strokeEdge` on the edge within 4 screen pixels of the pointer,
|
||||
or nothing when none is in reach, and Shift-click runs `livePaint.fill`. With both on, a click runs
|
||||
`livePaint.strokeEdge` when an edge is within 4 screen pixels of the pointer and `livePaint.fill` otherwise, and
|
||||
Shift-click runs `livePaint.fill`. With both off, a click runs nothing. With `highlight` off, the face or edge under
|
||||
the pointer is not outlined.
|
||||
Shift-click runs `livePaint.fill`. With both off, a click runs nothing. A drag from a press that runs
|
||||
`livePaint.strokeEdge` previews it with the drag's path in `points` (and `continuation` past 4096 points), so the edge
|
||||
and every edge of the same group that the drag crosses or comes within 0.0001 pt of take the stroke, hidden edges and
|
||||
other groups' edges skipped; the release keeps it as one undo step and Escape before the release cancels it. A drag
|
||||
from a press that fills a face fills only faces. With `highlight` off, the face or edge under the pointer is not
|
||||
outlined.
|
||||
A double-click runs the command a click there runs with `scope: "connected"`, and a triple-click with
|
||||
`scope: "samePaint"`; Alt held runs nothing, and so does Cmd/Ctrl (`mods.cmd`), whose presses go to the selection
|
||||
tool Cmd lends. With Space held (`mods.space`, the view tools), a press, a
|
||||
@@ -4125,9 +4129,10 @@ already walks Image Trace. Short agent entry points:
|
||||
defaults to the face's fill or the stroke paint the edge draws with. `livePaint.strokeEdge {scope: "connected", through}`
|
||||
takes `through`, at most 4096 ids of the group's edges, each given once, that the join counts as drawing with `match`
|
||||
whatever they draw with now; a hidden edge among them is still skipped. The tool passes each other edge of the group
|
||||
that either of the double-click's two clicks painted and that drew with `match` before that click. `through` with
|
||||
that either of the double-click's two clicks painted, by its press or its drag, and that drew with `match` before
|
||||
that click. `through` with
|
||||
another scope, or one that is not an array of the group's edge ids or names an edge twice, is an error and changes
|
||||
nothing. `livePaint.fill` refuses a `scope` other than `"one"` with `points`. Both replies add `count`, the number of
|
||||
nothing. `livePaint.fill` and `livePaint.strokeEdge` refuse a `scope` other than `"one"` with `points`. Both replies add `count`, the number of
|
||||
faces or edges the click reaches, including those that already had the paint.
|
||||
With the Live Paint Bucket selected and no drag in progress, Left and Right without Shift, Alt or Cmd/Ctrl (which
|
||||
keep their shortcuts) run `paint.setFill {swatch, ids: []}` (or
|
||||
@@ -4135,7 +4140,7 @@ already walks Image Trace. Short agent entry points:
|
||||
Swatches panel, wrapping around at the ends; from a color that is no swatch, Right picks the first swatch and Left
|
||||
the last, and with no color swatch the tool does not take the keys. The selected art keeps its paint. With
|
||||
`cursorSwatchPreview` on, the active paint shows as a ringed chip above the pointer between the swatches before and
|
||||
after it, except during a fill drag or with Alt held; a solid color that is no swatch shows alone, and a paint that is not a solid color shows no chip. Left and
|
||||
after it, except during a fill or stroke drag or with Alt held; a solid color that is no swatch shows alone, and a paint that is not a solid color shows no chip. Left and
|
||||
Right step the swatches with `cursorSwatchPreview` off too.
|
||||
`livePaint.merge` keeps the bottom Live Paint group's id, name, lock, visibility, transparency, appearance, opacity
|
||||
mask and graphic style link. With a Live Paint group among the objects, `livePaint.make` adds the others to it as
|
||||
@@ -4145,7 +4150,8 @@ already walks Image Trace. Short agent entry points:
|
||||
objects; otherwise it returns an error and does not merge the objects.
|
||||
A Live Paint command that changes nothing records no undo step, keeps the redo steps, leaves a saved document saved
|
||||
and replies as usual: `livePaint.fill` (a click, or a Bucket drag) when every face it reaches already has one fill, shown,
|
||||
fully opaque, blending normally and with the paint (or no fill, for none), `livePaint.strokeEdge` when every edge it
|
||||
fully opaque, blending normally and with the paint (or no fill, for none), `livePaint.strokeEdge` (a click, or a
|
||||
Bucket drag from an edge) when every edge it
|
||||
reaches already has one such stroke with the paint and the width (at any width for none, or no stroke),
|
||||
`livePaint.gapOptions` (and the Gap Options
|
||||
dialog's OK) when every group already has the options and `closeGaps` finds no gap, and `livePaint.make` or
|
||||
|
||||
@@ -2624,6 +2624,21 @@ Edit › Copy and Cut put the selected ruler guides on the clipboard, with the s
|
||||
`live_paint_bucket_drag_rejects_invalid_points_atomically` covers invalid command input.
|
||||
Behaviour source: [Paint with the Live Paint Bucket tool](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html).
|
||||
Scores and estimates unchanged.
|
||||
- **Live Paint Bucket stroke drag:** starting on an edge (Shift with Paint Fills alone, or a
|
||||
plain press with Paint Strokes on), a drag paints with the current stroke that edge and every
|
||||
visible edge of the same group it crosses or touches, including edges between pointer events;
|
||||
edges of other groups and hidden edges keep their strokes. The gesture is one Undo step, Escape
|
||||
cancels it, and a drag over edges that already have the stroke records no undo step. A drag
|
||||
that starts on a face still fills only faces. `livePaint.strokeEdge` takes the drag's `points`
|
||||
and `continuation` as `livePaint.fill` does. Regression evidence:
|
||||
`live_paint_bucket_drag_strokes_crossed_edges_as_one_undo`,
|
||||
`live_paint_bucket_stroke_drag_no_op_keeps_history`,
|
||||
`live_paint_stroke_drag_rejects_invalid_points_atomically` and the tool's
|
||||
`bucket_edge_drag_previews_points_and_commits_once`,
|
||||
`visible_edges_along_finds_crossed_and_near_edges` and
|
||||
`bucket_edge_double_click_joins_through_an_edge_the_first_drag_stroked`. The help page describes dragging across
|
||||
edges to stroke several at once: [Paint with the Live Paint Bucket tool](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html);
|
||||
how a drag finds the edges it crosses is VectorCraft's own rule. Scores and estimates unchanged.
|
||||
- **Live Paint Bucket cursors:** over a face a click fills (of a Live Paint group, or a region of
|
||||
the selected paths) the cursor is a filled paint bucket, over an edge it paints it is a brush,
|
||||
and where a click paints nothing it is an empty bucket. It follows Paint Fills, Paint Strokes
|
||||
|
||||
Reference in New Issue
Block a user