Commit Graph
778 Commits
Author SHA1 Message Date
.CooCoo 8af0c595eb Merge pull request #10840 from dotCooCoo/fix/canvas-upload-no-copy
Canvas: a rendered frame becomes its texture image without a copy
2026-12-04 14:19:57 -08:00
dotCooCoo fe4c78c976 Merge main into fix/bitmap-smoothing-every-view 2026-12-04 10:11:16 -08:00
.CooCoo edcb80db38 Merge pull request #10429 from dotCooCoo/feat/3d-rendered-tier
3D: Render Settings › Rendered draws the solid as a lit image with shadows from every light
2026-12-04 09:24:53 -08:00
.CooCoo a3c01a540c Merge pull request #10791 from dotCooCoo/fix/raster-effect-zoomed-drag
Effects: a zoomed-in drag filters raster effects once and moves the raster
2026-12-04 09:24:39 -08:00
dotCooCoo deb403f6fa Canvas: a rendered frame becomes its texture image without a copy
color_image_owned cast the raster's Vec<u8> to egui's Color32, which is
aligned to 4 bytes, so bytemuck's try_cast_vec always failed and the
fallback copied the whole frame: about 20 MB at 2880 x 1800 on every
full-frame upload, despite its doc comment.

The renderer now also renders into a Vec<u32> (render_words,
render_plain_patch_words, render_region_words). Over transparency the
vello context draws straight into those words; frames that compose
offscreen, blend in CMYK, show an opacity mask or are supersampled
are converted once. color_image_owned takes that buffer and hands it
to egui as Color32 in place. The canvas frame, the render worker's
frames, pan fills, split panes, edit parts and the region previews
(stroke and artboard images, graphic style swatches, the PDF page
preview, the flattener preview) use it.
2026-12-04 07:17:21 -08:00
dotCooCoo afc4de9b07 Render: a full-frame render hands its pixels over without a fill and a copy
Renderer::render, render_node, render_pattern_swatch and the image of
Effect > Rasterize copied the rendered pixmap into a new Vec<u8>. They
now take the pixmap's buffer and cast it to bytes in place
(group::into_bytes); a buffer the cast cannot take is still copied.
The target pixmap with nothing under it is allocated zeroed
(group::blank_pixmap) instead of being filled pixel by pixel. At
2880x1800 that removes one 20.7 MB fill and one 20.7 MB copy from every
whole-frame render. The pixels are the same bytes.

Part of #1172
2026-12-04 01:41:07 -08:00
dotCooCoo 5fe1391a35 Preferences: image smoothing reaches type rasters, pattern tiles and placed documents
With File Handling › Display Bitmaps as Anti-aliased Images (or its Pixel
Preview setting) off, images inside pattern tiles and placed documents now
show hard-edged pixels, and the tile or placed bitmap is drawn without
smoothing too. Tiles and placed bitmaps made with and without smoothing are
kept apart, and a raster kept for type with color bitmap glyphs is made
again when the setting changes.

- Tests: a 2x2 checker scaled up in a pattern tile, a placed document and
  the canvas shows only its own colors with smoothing off and greys with it
  on; type rasters change their inputs with the setting.
- Docs: docs/mcp.md and the preference help no longer note pattern tiles
  as an exception.
2026-12-04 01:31:56 -08:00
dotCooCoo a7a97bcc5b Effects: a zoomed-in drag filters raster effects once and moves the raster
Once an object with raster effects covers more than the pixel budget on
screen, its raster is cropped to the view. While dragging, such content
was rendered within the drag budget and no raster was kept, so every
frame of the drag painted the content and ran the whole effect chain
again: about 0.5 s a frame with Texturizer at 6400%.

A drag now keeps that raster when every effect only looks nearby. The
raster covers the view with a margin around it, within the drag budget
(at full resolution when the frame's crop fits it), and records the part
whose pixels the effects decided with all they look at. Later frames of
the drag move it with the object, as the whole-raster move already does,
while what the frame shows of the content, with the sampling footprint
of a lower-resolution raster, lies inside that part. A move or pan past
it filters again. Still frames are unchanged: a drag's raster never
draws outside a drag, and the frame after the drag renders as before.

Part of #2558. Builds on the approach of #2779 by 00xJS.
2026-12-03 12:17:46 -08:00
dotCooCoo 014ed9a190 Merge main into feat/3d-rendered-tier 2026-12-03 10:38:52 -08:00
dotCooCoo 9c11c47f75 Doc tests: unsafe code is denied in doc tests too
Rustdoc builds each doc test as its own crate, without the workspace's
`unsafe_code = "deny"` and without a library's `#![forbid(unsafe_code)]`,
so a doc test holding an `unsafe` block passed `cargo test --doc`.

- Every library root now carries `#![doc(test(attr(forbid(unsafe_code))))]`,
  or `deny` in cad, eps and metafile, which rely on the workspace lint.
- `cargo xtask layers` reports a library whose doc tests are missing the
  attribute, or use `deny` where the library forbids unsafe code.
- AGENTS.md names the rule next to the `unsafe` allowlist.
2026-12-03 09:51:28 -08:00
.CooCoo 61ac3d5d57 Merge pull request #10647 from dotCooCoo/fix/raster-400-worker
Canvas: pans at high zoom keep the paths the canvas drew while waiting for the worker
2026-12-03 08:21:40 -08:00
.CooCoo 4f0d45d555 Merge pull request #10444 from dotCooCoo/fix/web-image-paste-speed
Paste: a bitmap copied in another app is not encoded and decoded again
2026-12-03 07:25:43 -08:00
dotCooCoo e00a12ac60 Render: only a measurement ages the canvas renderer's caches
Renderer::changed set the measuring flag before it compared anything, so
comparing a document with itself still made the next
finish_measurement_only sweep the paths of the last frame. The flag is
now set where the diff measures an object through the renderer, in the
Trim View check (children_blend caches the groups it reads), and when a
change outside the layers redraws everything, so bounds kept for old
symbol definitions still expire.
2026-12-02 18:14:13 -08:00
dotCooCoo 629ad05f3c Render: frames that wait for the worker keep the canvas renderer's paths
The canvas calls Renderer::finish_measurement_only in every frame that
waits for the render worker. Since 51d3dcf2ea each call ages the
renderer's caches, so after four waiting frames the paths it drew were
swept even when nothing was measured, as after a zoom or a pan. The next
frame the canvas rendered itself built every path again: a pan step at
400% on a 6,000-path document took 25 to 34 ms instead of 8 to 10 ms.

finish_measurement_only now ages the caches only when Renderer::changed
measured through the renderer since its last frame or the last call, so
a drag whose frames go to the worker still lets go of old node versions.
2026-12-02 16:44:10 -08:00
dotCooCoo 00b3d4ca06 3D: rendered mode keeps perspective depths close to the eye
The clip matrix refused a depth range whose depth slope came out
negative, which happens when the nearest point is close to the eye
(eye 100, depths 0 to 99.5), and the solid fell back to shaded faces.
The mapped depth rises between the two ends whenever w is positive at
both, so the check now tests w and the mapped depths instead of the
slope. A test covers that range and a range that reaches the eye.

The resolution test also checks that the rendered image carries its
pixels, and docs/mcp.md and docs/target-app-parity.md say that
rendered shadows need both Shading and Shadows on.
2026-12-02 02:11:55 -08:00
dotCooCoo c0d184b457 Merge main into feat/3d-rendered-tier 2026-12-02 00:28:46 -08:00
dotCooCoo f0dbad051c Tests: render and trace tests check what they claim
Weak tests in vectorcraft-render and vectorcraft-trace now assert the
behavior they name:

- The stroke glow test checks that the glow is drawn and that four
  threads draw what one does, instead of only rendering.
- The JPEG and palette id tests name saved ids and labels directly
  (gray, optimized, none, blackWhite), unknown and empty ids, instead
  of looping over every value and reading its own id back.
- The trace presets test drops the loop over every preset name, which
  presets().len() already covers, and checks the [Default] and padded
  name lookups by their result.
- Nested discs each get the disc below them as parent, checked exactly.
- A 20 degree bend gets no corner under a 30 degree minimum turn, and
  gets one under a 10 degree minimum.
- The gray BMP, reduced CMYK and tiled image tests check the size of
  what they read, and the long stroke tests check that one outline was
  made before checking that none is cropped.
- The three drag timing probes assert that the frame after the drag is
  what a fresh renderer draws, in place of printing two hashes.
2026-12-01 17:25:41 -08:00
.CooCoo 32dca73ec1 Merge pull request #10432 from dotCooCoo/fix/test-tolerances-render-effects-brush
Tests: exact expectations for gradients, brush pressure, Smart Blur and effects
2026-12-01 06:39:09 -08:00
.CooCoo 83b2c22b78 Merge pull request #10148 from dotCooCoo/feat/corner-marks
Arrange Tools: Mark Bounds of Each draws corner marks or a rectangle on each selected object's bounds
2026-12-01 06:18:27 -08:00
dotCooCoo 438ffdcebe Paste: a cut-short bitmap read off the UI thread gives way to its text
When a picture is read later in place of text that only names it, a raw
bitmap whose pixels don't fill the size in its header is not taken: the
text beside it is pasted, as for any picture that can't be read. A raw
bitmap with no text beside it is still read and its error reported.

read_pixels documents what happens when the renderers' store refuses
the decoded pixels: they are dropped, and the PNG is decoded as any
other image is. A render test covers that case.
2026-12-01 06:02:24 -08:00
e28faa0a94 Color Halftone: draw dark dots on light tones (#10316)
* fix(effects): draw dark dots in RGB Color Halftone

(cherry picked from commit 2dbe91af9f)

* Cover dark-on-light RGB halftone polarity

Updated halftone tests to clarify behavior regarding pixel brightness and dot sizes.

(cherry picked from commit babd60e332)

* effects: bound Color Halftone dots at full coverage

(cherry picked from commit 8fb0bf55607762df6e3acc2ed7ed37a643fea022)

* effects: describe Color Halftone ink coverage

(cherry picked from commit 0dbf12514095b6e12cb4414055d8ac47ee1fbcdc)

* Document the change to saved RGB halftones

* Test the bounded edge overlap of full halftone dots

---------

Co-authored-by: Mex <[email protected]>
Co-authored-by: dotCooCoo <[email protected]>
2026-12-01 14:17:04 +01:00
dotCooCoo e14ee70326 Tests: exact expectations for gradients, brush pressure, Smart Blur and effects
Seven render, brush and effects tests accepted results well away from
the value the code is meant to give:

- The two linear gradient tests now expect the value at the pixel
  center (126 of 255, red 126 and blue 129) within 2 levels, instead of
  12 or 20 around 128.
- The trimmed bristle strand test bounds the width ratio on both sides.
- The calligraphic roundness test expects the 0.1 pt hairline within
  1e-6 pt.
- Pucker & Bloat expects the corner anchor at (12.5, 12.5) and
  (-12.5, -12.5), not only the sign of the move.
- Exposure's offset and gamma checks expect the sRGB value within 1e-5.
- Smart Blur's checksums of earlier output are replaced by a 4 pixel row
  whose averages are worked out by hand.

Each new assertion fails when the code it covers is changed (the
gradient stops shifted, the pressure, roundness, pucker, offset or gamma
factor changed, or the blur threshold widened).
2026-12-01 01:53:59 -08:00
dotCooCoo f1ef1a4e39 Render: a thin stroke takes the corners of its own subpath
A corner in one subpath gave the stroke's join to the lines of a curve
in another subpath that met at the same point, so a miter could be
drawn there instead of a round join. The corners are now kept per
subpath and each subpath of the outline reads only its own.

Test: a curve's outline is the same with and without a second subpath
that has a corner at the curve's start.
2026-11-30 23:02:15 -08:00
dotCooCoo 69ff74a63b Render: thin strokes keep smooth curves round where their lines turn sharply
Since #9972 a thin stroke along a curve is drawn as lines, and where two
of those lines met at a sharp angle the stroke's own join was drawn
there. Along smooth anchors that sit close together after a bend, or a
curve that bends tightly, the lines turn sharply, so a miter join drew a
spike past the stroke and the smooth curve showed sharp corners on the
canvas. The document's anchors are unchanged; only the drawing was
wrong.

The stroke's join is now drawn only at the path's own corners, where
two segments meet with tangents that are not in line. Where the lines a
curve is drawn with turn sharply they meet with a round join, as the
stroke along the curve itself is round there.

Tests: a bend followed by smooth anchors 0.1 and 1 apart keeps every
outline point within the stroke's width of the curve and covers it;
with long handles the outline matches the curve's own outline away
from its edge; 200 random cubics with a miter join keep their outline
within the stroke's width of the curve.
2026-11-30 22:21:53 -08:00
dotCooCoo 034c6fbd8d 3D: rendered images take every light's shadows and a Raster Settings dialog
- With Shadows on, every light with an intensity above 0 casts shadows on
  the solid and on the shadow plane in the image, black at 50%, with each
  light's Softness widening its edge; with Shadows off none does.
- Selection, Use Preview Bounds, Align, hit testing and snapping measure
  the shaded faces without rasterizing. Painted bounds hold the whole
  image, measured without rasterizing. Images are cached by their inputs.
- Expand Appearance and baking keep the rendered image; PDF export in a
  CMYK document writes it as raster effects are written.
- Render Settings gains Raster Settings... (resolution and background),
  built on the framework's parameter dialog; settings the selection holds
  differently open blank and are kept. The menu checks a choice only when
  every selected object has it.
- Tests for the clip matrix, coverage, depth order, the shading formula,
  limits, work bounds, edge values, masks and Revolve's objects-only rule.

Docs: docs/three-d.md, docs/mcp.md, effect params text.
2026-11-30 09:40:13 -08:00
dotCooCoo 1c5a867855 3D: Render Settings › Rendered draws the solid as a lit image with shadows from every light
Extrude & Bevel, Revolve, Inflate and Rotate take render.mode "rendered",
with quality (low, medium or high: 1, 2 x 2 or 3 x 3 samples a pixel),
resolution (null for Document Raster Effects Settings, or 1 to 2400 ppi)
and background (transparent or white). The effect then draws its solid
as one image made with craft-raster3d: a depth buffer, the effect's
lights in linear light with the material's roughness and metallic, and
shadow maps for each light, over the effect's vector shadow. The image
lies where the vector faces lie: each mesh point goes through the
projection the effect draws its faces with (MeshProjection).

The shaded faces are drawn instead, and the status bar and the
effect.apply and effect.setParams results carry a "warning", when the
image would pass 16,777,216 pixels at one sample a pixel, or when the
solid is painted with a gradient, a pattern, graphics, an opacity below
100% or a blending mode other than Normal, and for Revolve on a group or
on a fill or stroke. The warning check measures the image without
rasterizing it.

The 3D and Materials panel's Render Settings menu gains Rendered and Low,
Medium and High Quality. Each choice is one undo step for the selection,
and each object keeps its other render settings.

The effect-art cache now includes the document's raster resolution, so
changing Document Raster Effects Settings redraws rendered images.

Every craft-libs rev moves to 64383b59, which adds crates/raster3d.

Docs: docs/three-d.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-30 04:13:14 -08:00
dotCooCoo 314ee3681e Arrange Tools: Mark Bounds of Each draws corner marks or a rectangle on each selected object's bounds
Object > Plug-ins > Arrange Tools > Mark Bounds of Each... runs the new
command addon.arrange.markBounds. For each selected object it draws a
group of four inward L-shaped corner marks (10 pt legs by default, each
at most half the side it runs along) or a rectangle, with no fill and a
red 1 pt stroke by default, on the object's geometric or visual bounds.
Visual bounds count strokes, brush art and effects as drawn.

- Clip groups are measured by their clipping path, other groups by
  their members together. Guides and objects without bounds, such as
  empty groups, are skipped; a selection with nothing to mark is an
  error that makes no undo step.
- The marks go directly above their object, or above the outermost clip
  group or clipping sublayer that holds it, so the mask does not clip
  them. The run is one undo step and selects the marks.
- Out-of-range lengths and weights, unknown styles and bounds, and bad
  colors are errors; defaults apply only to omitted values. At most
  20000 objects are marked at once.
- The dialog has Preview; Length is off unless Draw is Corner Marks.
- vectorcraft-render gains drawn_bounds_with, drawn_bounds with a shared
  symbol cache, so a large selection measures each symbol once.

Docs: docs/mcp.md, ROADMAP.
2026-11-29 12:57:12 -08:00
dotCooCoo a8e75a5ab6 Merge main into fix/repeat-outer-effect-redraw 2026-11-28 16:12:30 -08:00
dotCooCoo a9aa1f405b Render: curve lines keep both turns of a curve that turns back twice
A curve drawn as lines took its line ends from the curve's bending alone.
Where a curve runs out and back twice along almost one line, its two turns
hold almost no bending, so a thin stroke drew it with one step in two
halves: each half held a whole turn, the two halves' gaps canceled, and
the band ran straight from start to end without either turn. A cubic from
(0, 0) out to x = 28.87 and back to x = -28.87 drew only around x = 0.

Each step is now checked against its curve: where the curve lies more
than twice the chord allowance from the step's line, to either side or
past its ends, the step count doubles, up to the curve's equal steps.
Wide strokes draw their long curves the same way and get the same check.
2026-11-28 14:36:09 -08:00
dotCooCoo 06c260f637 Render: redraw the effects on a shadowed radial or mirror repeat's copies
A radial or mirror repeat with an effect of its own, such as a drop shadow,
takes its bounds from the object-effects branch, which falls back to
`own_box`. `own_box` measured the placed steps of a spine-aligned blend but
not the rotated or reflected copies of a repeat, so moving such a repeat left
the copies' geometry effects outside the redrawn area. `own_box` now unions
a repeat's placed copies as #9936 does in `cull_bounds_in`.

`placed_live_effect_bounds` now looks for effects below the node only: the
node's own effects run on the placed whole and its callers measure them, so a
repeat or blend whose only effect is its own no longer expands its copies or
steps to measure them.
2026-11-28 13:59:20 -08:00
dotCooCoo d91b815690 Render: thin curve lines stop where the curve turns back
Each line end of a curve drawn as lines moved out by the curve's whole gap
from the chords beside it, including the part along the chord. Where a
curve runs out and back along almost one line, that part points along the
curve, so the end moved past the turn: a cubic from (0, 0) out to x = 75
and back drew its band out to x = 112.5. The ends now move only across
their chords.
2026-11-28 13:49:09 -08:00
dotCooCoo ce09bd96b4 Merge main into fix/issue-7257 2026-11-28 11:28:42 -08:00
dotCooCoo 36c5f65b24 Fix #7257: thin curved strokes draw with half as many outline lines
Strokes narrower than four raster tolerances had their outline fitted and
flattened at a tolerance as fine as 1/16 of the raster tolerance, so each
side of a thin curve took about four times the lines a wider stroke takes,
and every frame drew them all. A plain thin stroke (no dashes, no width
profile) along a path with curves is now drawn as lines first, within a
sixth of its width of the curve, and each side of each line is offset by
exactly half the width. The band keeps its width, the outline takes one
line per side for each line of the path. Where two lines meet at a small
angle both sides go to where their offsets cross; sharper corners get the
stroke's join, open ends its caps, and a closed path keeps its hole. Dashed
and profiled thin strokes, and thin strokes along straight paths, are
unchanged.

On 200 cubic curves about 100 device pixels across, a 0.5 px stroke's
outline goes from 15,559 lines to 7,514 (4,288 before #3273).
2026-11-28 11:28:42 -08:00
.CooCoo efa21dd3fe Merge pull request #9936 from dotCooCoo/train/carry9169
Render: redraw the effects of rotated radial and reflected mirror repeat copies
2026-11-28 08:56:25 -08:00
dotCooCoo fdffa121a9 Render: cover the effects on reflected mirror repeat copies
A Mirror Repeat on a slanted axis reflects its copy before the source's
geometry effects run, so a Transform effect on the copy painted outside
the move and Undo damage region, the same fault #9169 fixes for Radial
Repeat. Mirror repeats now take the same measured bounds, with a test
that fails without the change.
2026-11-28 08:05:59 -08:00
.CooCoo 8cdd897b23 Merge pull request #9909 from dotCooCoo/feat/windows-thumbnail-handler
Windows: Explorer shows thumbnails of VectorCraft documents
2026-11-28 08:03:20 -08:00
dotCooCoo 5219ff0754 Merge main into train/carry9169 2026-11-28 07:34:31 -08:00
dotCooCoo 0ab27fdc73 Placed documents: a bitmap made on the drawing thread stops being pending when it panics
Where no background worker starts (and on the web), schedule makes the
bitmap on the drawing thread. A panic there left the bitmap pending, so
wait_idle, which has no time limit, could wait for it forever. That path
now does what the worker does after a panic: it marks the bitmap failed
and stops it being pending, then lets the panic go on to the caller.
2026-11-28 04:39:53 -08:00
dotCooCoo b12c27e518 Linux: file managers show thumbnails of VectorCraft documents
The deb, rpm and tar.gz packages install
share/thumbnailers/ai.storyteller.vectorcraft.thumbnailer for
application/x-vectorcraft and application/x-vectorcraft-template. It runs
the new `vectorcraft-cli thumbnail --size N IN OUT`, which opens the
document as the app does and writes an 8-bit RGBA PNG of the first
artboard, N pixels (1 to 1024, default 256) on its longer side.

A file larger than 256 MiB, one that can't be opened, a document that
shows nothing, or a run longer than 20 seconds writes no PNG and exits
non-zero, so the file manager keeps the file's icon. The Nightly deb and
rpm leave the entry out, as they leave out the MIME package.

The render moves into vectorcraft_render::encode::first_artboard, which
the embedded native preview also uses.
2026-11-28 02:39:17 -08:00
dotCooCoo e8ab35ad0c Outline view: a group measures a Preview-off sublayer in the sublayer's mode
A layer whose Preview is off draws a placed document in it as the crossed
box, and effects that change geometry reshape that box. Two cull-bounds
paths measured such a sublayer in the mode around it instead:

- A group with effects of its own (a drop shadow, for example) is measured
  by fx::cull_bounds, which did not enter each layer's own mode. The group
  was culled where the sublayer's moved crossed box was in view. Each layer
  in that walk is now measured in the mode its Layer Options give it.
- A group's cached bounds were keyed only on whether placed documents are
  crossed. Turning Show Images in Outline Mode on or off changes a
  Preview-off sublayer's mode without changing that, so the group kept its
  old bounds. Every object other than a path is now keyed on the full
  layer mode.
2026-11-28 00:54:53 -08:00
.CooCoo a949db79fe Merge pull request #9137 from dotCooCoo/feat/plugin-api-live-effect-appearance
Plug-ins: live effects set opacity, blending and effects on their pieces
2026-11-28 00:46:29 -08:00
dotCooCoo 41eef74720 Effects: geometry effects work from bounds that hold lone anchors
A geometry effect is given the object's box as its reference, for
example the center a Transform effect scales and rotates about. Drawing,
the preview bounds, Expand Appearance's first step, shape art, the
outline check of the .ai reader and a stroke's effects before a Transform
that makes the stroke a path of its own measured that box with kurbo's
bounding_box, which counts only segments. A lone anchor was left out, and
a path of one anchor measured a box at the origin, so it scaled about
(0, 0). PathData::bounds, which the selection's box, Align, Transform
Each and every later effect in the stack use, holds lone anchors.

- geom: anchored_curve_bounds measures a BezPath as PathData::bounds
  measures the path it stands for.
- render, effects and the .ai reader give geometry effects that box.
  Gradient reference boxes and clip regions are unchanged.
2026-11-27 23:16:54 -08:00
dotCooCoo 5a771c52f7 Merge main into feat/plugin-api-live-effect-appearance 2026-11-27 22:50:09 -08:00
.CooCoo 9dc7456621 Merge pull request #9850 from dotCooCoo/fix/outline-placed-envelope-blend
Outline view: test the crossed box in envelopes and blends of placed documents
2026-11-27 22:18:20 -08:00
.CooCoo a91c38ee5c Merge pull request #9868 from dotCooCoo/fix/effect-bounds-lone-anchors
Effects: bounds hold the dot a closed lone anchor draws
2026-11-27 22:17:43 -08:00
.CooCoo 68f4d94d8b Merge pull request #9806 from dotCooCoo/fix/outline-placed-geometry-effects
Outline view: effects reshape a placed document's crossed box
2026-11-27 22:16:43 -08:00
dotCooCoo b73f28dc71 Effects: bounds hold the dot a closed lone anchor draws
A round or projecting cap draws a dot for a closed subpath of one anchor.
The bounds the effects are measured by left that dot out: the visual and
cull bounds, the box Rasterize makes its image over, and the reach of an
effected path's raster effects. A path of only lone anchors was measured
at the origin.

- `vectorcraft_geom::path::drawn_curve_bounds` measures a kurbo path as
  `PathData::drawn_bounds` measures the anchors it stands for.
- `crates/render/src/fx` measures effected paths with it, and a path that
  draws nothing by its anchors, as `Node::visual_bounds` does.
- A stroke measured along its segments (miter and bevel joins, projecting
  caps) gives the dot of a closed lone anchor its reach.
2026-11-27 20:21:07 -08:00
dotCooCoo 3dac89fe53 Outline view: test the crossed box in envelopes and blends of placed documents
In Outline mode without Show Images in Outline Mode, an envelope holding
a placed document distorts the document's crossed box, since the
envelope reads the art that PlacedDocument::art gives while placed
documents are crossed. Each step of a blend of placed documents is a
placed document itself, so it is drawn crossed.

- outline_mode_warps_an_enveloped_placed_documents_crossed_box: an Arc
  warp of a placed document draws the same pixels as the same warp of
  its crossed box as a plain path, and the file's art with Show Images
  in Outline Mode on.
- outline_mode_draws_each_step_of_a_blend_of_placed_documents_crossed:
  the step between two placed ends is crossed, and drawn uncrossed with
  the option on.

Docs: docs/ui-parity.md row, docs/mcp.md outlineImages.
2026-11-27 18:12:47 -08:00
dotCooCoo 8b02390a61 Tests: placed document tests wait on handshakes instead of timers
The render crate's placed-document tests decided results by wall-clock
time:

- The gate that holds the background worker opened by itself after 10 s,
  so a test that forgot to open it still passed. It is now a mutex and a
  condition variable with no time limit, opened when the guard that
  shut_gate returns is dropped (also when the test fails).
- settle polled busy() every 5 ms for up to 10 s. It now waits on
  placed_document::wait_idle, which a condition variable signals when
  the last pending bitmap is finished.
- The self-placing document test asserted that drawing took under 10 s.
  It now asserts how deep the drawing went (at least 2 levels, at most
  MAX_DEPTH), read from a test-only counter kept by the depth guard.
2026-11-27 17:03:49 -08:00
dotCooCoo 6245d6b118 Outline view: effects reshape a placed document's crossed box
In Outline mode without Show Images in Outline Mode, a placed document
with an effect that changes geometry (Transform, Roughen, plug-in
effects), its own or its group's, drew its file's art reshaped and
without the X. The effects now reshape the crossed box instead, so a
Transform effect moves the crossed box.

- While a frame draws placed documents crossed, a placed document's art
  is its box with both diagonals (PlacedDocument::crossed_art), so every
  effect and evaluation that reads that art uses the crossed box.
- Layers are drawn and measured in the mode their Layer Options give
  them: a template layer in Outline view still shows the file's art,
  and a layer or sublayer whose Preview is off shows the crossed box.
  A layer with effects of its own now follows its Layer Options too;
  before, it drew in the view's mode.
- Kept effect art, cull bounds and the areas redrawn after an edit are
  measured in that mode and kept apart per mode.

Docs: docs/ui-parity.md row done, docs/mcp.md outlineImages.
2026-11-27 13:30:42 -08:00