680 Commits
Author SHA1 Message Date
dotCooCoo 18c4a7b965 Merge main into feat/stylus-wheel 2026-11-18 07:27:22 -08:00
yoriswind 390203c35b 6582: resolve status documentation after the Blend fix merged 2026-11-18 05:13:11 -08:00
BFlat dce8a0c05e Merge pull request #7065 from yoriswind/codex/5179-blend-spine-redraw-bounds
Fix redraw bounds for blends following a curved spine
2026-11-18 19:58:54 +07:00
yoriswind 91898148d6 6582: preserve Eraser behavior with current upstream documentation 2026-11-18 04:55:12 -08:00
yoriswind 1d28f45f58 6582: retain fitted gradients beneath enclosing geometry effects 2026-11-18 04:39:25 -08:00
yoriswind 56b4fcb8c6 Fix redraw bounds for rotated Blend effects
Measure effect-bearing Align to Path content after spine placement, retaining
the conservative envelope and covering damage containment with original
software-rendered move and Undo controls.
2026-11-18 03:19:27 -08:00
yoriswind 3f09579dcd Merge upstream main to resolve PR #6601 documentation conflicts 2026-11-18 02:41:17 -08:00
yoriswind a9b4015e40 Merge pinned current main for the confirmed #7065 bounds repair 2026-11-18 00:37:17 -08:00
dotCooCoo 8486bd1892 Save for Web: pixels of a transparent color that does not fit in a fixed palette stay transparent
With transparent pixels and Colors at 256, a custom palette of one opaque color and 255 colors mapped to transparent has no room for the last of those, and its pixels took the nearest entry left, which could be the opaque color. Such pixels now take the transparent entry when their nearest color is one that did not fit.
2026-11-17 18:27:15 -08:00
yoriswind 0dd87f8921 Merge main into the qualified Eraser group-stroke repair 2026-11-17 17:40:53 -08:00
dotCooCoo dc30166813 Merge main into feat/save-for-web-delete-color 2026-11-17 16:25:37 -08:00
dotCooCoo 949171b715 Save for Web: GIF lossy moves no pixel into or out of a shifted color
Lossy compression compared each pixel with the reduction's colors, so a pixel next to a color shifted by hand could join that color and be written in its new color, and a pixel of the shifted color could leave it. Lossy now leaves the entries of shifted colors alone, as it does the transparent entry.
2026-11-17 15:32:51 -08:00
dotCooCoo c9812414ce Merge main into feat/save-for-web-shift-color 2026-11-17 13:00:56 -08:00
dotCooCoo 09b7f6c3ce Merge main into feat/stylus-wheel 2026-11-17 12:36:31 -08:00
BFlat 1f84febb08 Merge pull request #8169 from dotCooCoo/fix/symbol-lookup-index
Symbols: render and SVG/PDF export find each instance's symbol in one index
2026-11-18 03:23:44 +07:00
dotCooCoo 54e8d3046e Save for Web: Delete Color removes colors from the color table
The color table's trash button and Delete Color in its new menu delete
the selected GIF or PNG-8 colors. Pixels that used a deleted color take
the nearest color left, with the current reduction's color distance and
dither, and the preview matches the saved file. A click selects one
color and makes it the anchor, Shift-click selects the range from the
anchor, and Ctrl-click (Command-click on macOS) adds or removes one.

- colorTable.deleted lists the deleted colors by source. A deleted color
  leaves the locked, transparent and webShift lists.
- colorTable.customPalette fixes the palette at the first deletion, so a
  deleted color is not made again; the table reads Custom. Restore
  Generated Table in the menu, or another reduction, clears both.
- Deleting every opaque color, or every color not mapped to transparent,
  is an error and changes nothing.
- Presets and the remembered settings keep the edit.
- quantize_to uses all 256 fixed colors when no pixel is transparent.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-17 12:23:26 -08:00
bflatastic 82c9631b57 Render: a gradient mesh past any buffer draws without flattening its outline
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
2026-11-18 01:41:52 +07:00
yoriswind 4c764b2912 Merge main and retain qualified changes for #7065 2026-11-17 05:51:24 -08:00
dotCooCoo 14d814b9f0 Merge main into feat/stylus-wheel 2026-11-17 03:57:49 -08:00
yoriswind df92153483 Merge upstream main and retain independent progress documentation 2026-11-16 23:59:16 -08:00
BFlat b506bdc525 Merge pull request #8228 from dotCooCoo/feat/webp-lossy-quality
WebP: Lossy with a Quality setting writes a lossy WebP file
2026-11-17 11:45:05 +07:00
yoriswind 443b081128 Merge upstream main and retain independent parity history 2026-11-16 19:11:21 -08:00
BFlat dff94107d9 Merge pull request #8247 from dotCooCoo/feat/rasterize-transform-copies
Effects: each copy of a Transform effect listed after Rasterize carries the Rasterize image
2026-11-17 09:48:50 +07:00
dotCooCoo 6dae0b77e5 Merge main into feat/webp-lossy-quality 2026-11-16 17:39:20 -08:00
BFlat 1b14abbcdb Merge pull request #8080 from dotCooCoo/perf/curved-stroke-edges
Render: wide curved strokes draw their rims closer to the curves
2026-11-17 08:19:45 +07:00
dotCooCoo 76acc2e16c WebP: lossy export refuses a frame whose first partition overflows its size field
A VP8 key frame stores its first partition's size in 19 bits (RFC 6386
section 9.1). The encoder writes 524,287 for a larger partition too, and
a decoder then reads the token partition from the wrong offset. A lossy
WebP whose size field is at that limit now fails with an error that
suggests a lower resolution or Lossless, instead of writing a file that
does not decode.
2026-11-16 17:00:02 -08:00
FredApps 9a01d266b0 Merge pull request #8152 from storytold/cutover/shared-packbits
refactor: share TIFF and EPS PackBits encoding
2026-11-16 23:30:20 +01:00
yoriswind e9444983ef Merge main and preserve source-fitted container gradients 2026-11-16 14:16:34 -08:00
dotCooCoo 00f42826ef Effects: each copy of a Transform effect listed after Rasterize carries the Rasterize image
On a path or compound path, a Transform effect with copies listed after
the object's own Rasterize effect now places the one image Rasterize
makes of the art before it on the original and on each copy: copy k
through the effect's map applied k times, with its pixel grid and its
room around the art, the last copy lowest and the original on top.
Before, the Transform effect copied the art and Rasterize made one image
of all the copies on a grid square to the page.

The image is made once for every placement, also when a shadow or glow
is listed between the Rasterize and Transform effects. The canvas, the
object's bounds, Expand Appearance and PDF export use the same
placements; Expand Appearance and PDF export make a group of images that
share the one image's pixels. Copies stop where the copied art stops,
and a copy scaled to nothing is left out.
2026-11-16 13:55:27 -08:00
dotCooCoo 2f7e60dd54 WebP: Lossy with a Quality setting writes a lossy WebP file
WebP Options has a Compression menu (Lossless, Lossy) and a Quality
slider from 0 to 100 that is enabled for Lossy. document.export,
document.serialize and Export for Screens take lossless: false with
quality (default 90) and write a VP8 file, with an ALPH chunk that keeps
the alpha exactly when some pixels are not opaque. Lossless stays the
default. A WebP quality above 100, or one that is not a whole number,
is refused with an error.

The encoder is the one craft-image-codecs already provides; no
dependency changes. The note that lossy WebP isn't available, its
catalog rows and the format text that described it are removed.
2026-11-16 12:30:56 -08:00
dotCooCoo 16719913ae Merge main into perf/curved-stroke-edges 2026-11-16 10:49:53 -08:00
dotCooCoo 097eaba2b5 Merge main into fix/transform-copies-raster-effects-groups 2026-11-16 10:35:16 -08:00
dotCooCoo 1143546a0a Symbols: keep per-object measuring in the export walks; live walks and SVG import use the index
The export walks for type and fonts and the artboard crop shared one
SymbolBoxes for every object. A SymbolBoxes also holds measuring budgets
(effect reaches, 9-slice placements), so in a large document objects late
in a walk could be measured by estimates where main measured them exactly.
SymbolBoxes::unmeasured makes new boxes that share the name index, and each
object is measured in boxes of its own again.

- The live-object walk (render/src/live.rs) finds symbols through the
  frame's SymbolBoxes.
- SVG export's filter regions measure each object in unmeasured boxes, and
  the region boxes share the writer's index.
- SVG import keeps each imported symbol's index, so a symbol whose art
  holds instances no longer scans or indexes the list again.
- Object › Rasterize's clipping mask is left as it is on main, with
  drawn_outline_with removed.
- The symbol-read-count feature of vectorcraft-doc gives other crates'
  tests vectorcraft_doc::symbols_read. New tests check that a frame, an SVG
  export, a PDF export, the type walk and the artboard crop read the symbol
  list once among 2,000 symbols and 300 instances with drop shadows.
2026-11-16 09:07:50 -08:00
dotCooCoo 52b4b03920 Symbols: render and SVG/PDF export find each instance's symbol in one index
Drawing or exporting a symbol instance looked its symbol up by scanning
the document's symbol list, so a document with many instances and many
symbols spent most of a frame or an export on name comparisons. The
renderer, the SVG and PDF writers and the export walks now find symbols
through SymbolBoxes::symbol, which builds the name index once per frame,
export or walk and returns the first symbol of a name as before.

- Renderer: plain instances, inline graphics, instances with object
  effects (their art and the symbol budget) and the effect bounds.
- SVG export: instance art, symbol defs and their reuse check, and the
  paint reach of filter regions.
- PDF export: instance art, inline graphics and the brush search of
  knockout masks.
- Export warnings and artboard crops measured what each object paints
  with new symbol boxes per object, which built the name index again for
  every instance. painted_bounds_with and drawn_outline_with take the
  boxes once; Object › Rasterize's clipping mask uses them too.
2026-11-16 07:24:45 -08:00
yoriswind bda1c489d5 M2: reconcile Eraser fill preservation with main (#6582) 2026-11-16 07:22:56 -08:00
Dylan M. Taylor ae86489406 render: delegate TIFF and EPS PackBits encoding to craft-stream-codecs 2026-11-16 10:08:08 -05:00
dotCooCoo 83d8bcb5ed Render: wide curved strokes draw their rims closer to the curves
The canvas flattened a stroke's outline at 0.25 device pixels with chords
inside each curve, so a wide curved stroke's outer rim drew too light and
its inner rim too dark. A stroke at least 32 drawing tolerances wide now
draws each curve of its outline that spans 128 tolerances or more as lines
placed by its bend, with each line end moved outward by half the line's
bulge, so the lines lie on both sides of the curve. That is 8 and 32
device pixels at 25% and 1:1, and as little as just over 4 and 16 device
pixels at other zooms, where the cached outline's tolerance is the largest
power of two at or below a quarter device pixel.

At 25% zoom an 80 pt ring's worst edge pixel is 24 levels off the exact
coverage at the outer rim and 32 at the inner rim, where it was 54 and 61;
at 1:1 it is 30 and 29, where it was 64 and 58. Curve ends at corners,
lines and short curves stay on the curve. Outlines are cached per zoom
level as before, with refined and plain outlines kept apart.

Raster exports draw the same refined edges as the canvas. Fills, narrower
strokes, strokes with a width profile, strokes in an unevenly scaled view
and vector exports are unchanged.

Tests: render::tests::curvedstrokeedges and
longstroke::a_long_wide_curved_stroke_draws_the_same_pixels_outlined_near_the_view.
2026-11-16 00:24:52 -08:00
yoriswind a829b54a24 M2: ignore hidden Rasterize and path-gradient rows 2026-11-15 23:43:42 -08:00
yoriswind 573a924d19 M2: preserve evaluated ancestor gradients while erasing 2026-11-15 23:07:02 -08:00
dotCooCoo f7401096cd Merge main into fix/transform-copies-raster-effects-groups 2026-11-15 22:13:06 -08:00
FredApps 3e72836b00 Merge remote-tracking branch 'origin/main' into feat/cutover-remaining-codecs 2026-11-16 07:08:15 +01:00
BFlat 2f80541c48 Merge pull request #8000 from dotCooCoo/fix/transform-copies-raster-effects-rows
Effects: each copy of a fill's or stroke's Transform effect carries the raster effect listed before it
2026-11-16 12:55:24 +07:00
FredApps bfe5c253f4 Merge remote-tracking branch 'origin/main' into feat/cutover-remaining-codecs
# Conflicts:
#	crates/engine/src/cmd/menucmds.rs
2026-11-16 06:35:17 +01:00
FredApps 48d4afe4ec svg: SVG import decodes its images through craft-image-codecs
The decoding File › Open, Place and the renderer share moves to
vectorcraft-doc (decode.rs: decode_image, decoded_layout), and SVG
import's images read through it: the size from the header against the
allowance first, then the pixels as stored with the profile the file
embeds (a TIFF's still read by the TIFF reader).

decoded_pixels_are_those_the_image_crate_read compares PNG, GIF, WebP,
TIFF and BMP at each depth the image crate writes with its pixels, and
JPEG within two steps.
2026-11-16 06:06:34 +01:00
dotCooCoo 033b494836 Merge main into feat/stylus-wheel 2026-11-15 20:46:32 -08:00
FredApps 3590f96ba9 engine: File › Open and Place read rasters through craft-image-codecs
The raster path tells formats with craft-image-codecs' detect, reads the
size from the header (vectorcraft-doc's header_size, the renderer's
decoded_layout, a Targa's own header) and decodes with the renderer's
decode_image, the pixels as stored, with the profile the file embeds.
The size notes Open, Place and the Links panel give, and Glass's Load
Texture, read the same way.

opened_rasters_are_the_pixels_the_image_crate_read compares BMP, TGA and
TIFF at 8 and 16 bits, gray and color, with and without alpha, with the
image crate's pixels, and PNG, JPEG, GIF and WebP stored as they are.
2026-11-16 05:45:22 +01:00
FredApps 9047af65f8 render: decode images through craft-image-codecs; keep main's JPEG writer
The renderer's image paint reads sizes from the header (vectorcraft-doc's
header_size, craft-image-codecs' inspect_raster) and decodes through
craft-image-codecs, the pixels as stored, for the formats it drew
before (PNG, JPEG, GIF, WebP, TIFF and BMP). A test compares the pixels
with the image crate's for each PNG color type and depth, palettes and
1-bit gray, GIF, WebP, TIFF, BMP and JPEG.

The JPEG writer goes back to main's jpeg-encoder one: the craft-image-codecs
version wrote a CMYK JPEG's resolution in a little-endian EXIF of another
layout, failing the tests of main's #3084 fix. TIFF LZW strips stay on
craft-stream-codecs, checked against weezl (now a dev-dependency): read
back the same and never larger.
2026-11-16 04:48:31 +01:00
dotCooCoo 139b700334 Merge main into feat/stylus-wheel 2026-11-15 19:38:10 -08:00
dotCooCoo 69d3402f2a Merge main into feat/psd-export-writes-slices 2026-11-15 18:39:24 -08:00
dotCooCoo eb48e1c0ed Merge main into fix/transform-copies-raster-effects-groups 2026-11-15 18:36:34 -08:00