A Pencil stroke always previewed as the path it draws, with its full
appearance: with a fill set, the fill flipped between the shape and its
inside-out as the stroke crossed itself or curved back, and hid the line
being drawn.
Pencil Tool Options get a Live preview checkbox, above Live curve
fitting, on by default and kept with the tool's other options
(`livePreview`, settings.rs). With it off, the stroke previews nothing
while it is drawn: a thin line follows the pen (the drag overlay the
Knife and Blob Brush already show), and the release, or a switch of
tool mid-stroke, draws the path with its fill and stroke, as one undo
step, as before. Escape still cancels the stroke. With it on nothing
changes. The Paintbrush has no such option and keeps previewing.
Public reference: Draw and edit paths using the Pencil tool,
https://helpx.adobe.com/illustrator/using/tool-techniques/pencil-tool.html
(lists Live preview and Live curve fitting among the Pencil's options).
The checkbox label is translated in all 24 catalogs.
Tests: pencil_with_live_preview_off_shows_a_thin_line_until_the_release
(tools), pencil_with_live_preview_off_draws_the_filled_path_on_release
(engine), and the freehand dialog test shows the checkbox for the Pencil
only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The message scan read the first argument of every error variant, so
for EngineError::Disabled it read the command id and missed the reason
the status bar shows. It also read error calls inside comments, such as
a commented-out bad(cmd, "..."), as messages that need catalog rows.
The scan now reads Disabled's second argument and removes // and
/* ... */ comments (nested ones included) before it looks for calls. A
// or /* inside a string or character literal does not start a comment.
Review: reading `1,000` as 1 would give someone who writes decimals
with a point a value a thousand times too small, with no sign that
anything went wrong; refusing it, as before, is the safer answer.
A number that reads as thousands (one to three digits, a comma,
exactly three digits, then at most a unit: `1,000`, `12,500 mm`) now
keeps its comma, so the field refuses it. `0,125` is still a decimal
(a lone 0 never groups thousands), as are `1,25`, `1,0000` and
`1,500+2`.
Typing an offset of `0,1` in Offset Path, in a document in
millimeters, put the field back to the value it had (1 mm), so it
looked as if values under 1 mm were refused. The length parser only
takes a point as the decimal separator, and a field drops text it
can't read.
The shared numeric fields (unit_field, bounded_field and opt_field)
now read a comma as the decimal separator when the text has no point,
so `0,1 mm`, `1,5+0,25` and `12,5%` work in every dialog and panel
that uses them. Text with a point keeps its commas, so `1,000.5` is
still refused. The engine, MCP and control channel keep the strict
format.
A selected compound path (a shape with a hole, such as one made with
Object › Compound Path › Make) could not be redrawn with the Pencil or
the Paintbrush: at the press, find_redraw looked only for selected
objects that are paths themselves, and a compound path's paths are its
children. The stroke then drew a new path, which Keep selected selected
in place of the compound path, so every later stroke near the shape drew
a new path too: redrawing seemed to stop working.
- find_redraw takes a selected compound path's member paths as well,
the nearest one within Edit selected paths within of the press.
- path.freehand's redraw keeps the compound path selected (or, with Keep
selected off, takes it out of the selection) when the redrawn path is
one of its members, so the next stroke redraws it too.
Test: pencil_redraws_a_selected_compound_path redraws the outer path and
then the hole of a selected compound path; it fails without this change
(the first stroke draws a new path).
cargo xtask ci: every step passes except one test in `test`,
vectorcraft-pdf tests_import_fidelity::text_becomes_point_type, which
fails the same way on unmodified main on this machine; it is unrelated
to this change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The loop that keeps rare colors stopped at the first color past the
budget of six, so a cut-edge blend listed after it was not recorded as
tracing as its rare color, even when that rare color was kept, and its
pixels went to the nearest color instead. The loop now goes on past the
budget and only stops keeping new rare colors. It moves into
`kept_rare`, which a new test calls with seven rare colors and a blend
of the first.
The test of an outline over a cut edge in the color of other art also
checks that the dark paths reach the top and the bottom of the disc,
which no bar comes near: before, the bars alone met its checks.
Each embedded DIB was bounded on its own (2^26 pixels), but not their total, so a small EMF or WMF of many BI_PNG/BI_JPEG records could cost minutes of decoding. The importer now gives a file 2^28 pixels for all its bitmaps, charged from each bitmap's header before it is decoded; bitmaps past it are left out with a warning.
Replace glob imports (`use super::*`, `use crate::*`, `use sig::*`) with
the names each file uses, in scriptcheck, pdf, render, text and ui-egui.
No code changes.
Replace glob `use super::*` with the names each module uses, so the
module's imports are visible at the top of the file (Sonar rust:S2208).
No code changes.