The PDF export codec goes through photocraft-codecs; nothing in the crate used the image crate, so the dependency and its lockfile edge are removed. pdfium-render stays pinned exactly.
Every function this PR adds now has a doc comment, including the test functions in the importer, PDF export and layers_to_files suites. No behaviour change.
Module docs now state that pdfium-render 0.9.5 exposes path fill/stroke presence but not paint, width or dash (black paints, 1 pt stroke); that text colour is sampled and fonts are matched by family/name; and that only package.ps1 provisions PDFium, not the shared release workflow. The text and path extraction comments say the same where the code relies on it.
Raise docstring coverage on the functions this PR adds: the fixture/assertion helpers in the end-to-end test and the importer's test frame builders now have doc comments. No behaviour change.
The Window menu item from #11669 and the Azerbaijani catalog landed
together, so azerbaijani_covers_every_menu_label_and_path fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Map editable objects through the page's effective bounding box (media box clipped to the crop box) rather than the raw CropBox: an oversized CropBox no longer offsets text or paths from the rendered page. Covered by a fourth fixture page with CropBox (-50, -50, 250, 150) around a 200 x 100 MediaBox.
- Add a document-wide editable-object budget (20,000 layers, 1,000,000 path knots). A page that exceeds it keeps its raster, warns that its editable objects were omitted, and the unit test covers the accounting.
A preview at a reduced work scale (4 %) takes a stored 2 % pattern to
0.08 %, which Placement::anchored and the GPU planner's placement treated
as invalid and drew at 100 %. Any positive finite scale now draws,
floored at 1e-6 to keep tile coordinates finite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Map editable text and paths through the page's crop box and /Rotate, matching the rendered raster: box offsets, 90/180/270 rotation, rotated text transforms and rotation-aware colour sampling.
- Check cancellation while traversing page objects and before returning the import; cap text colour samples at 4096.
- The cached PDFium failure now says to restart the application after fixing the library path.
- package.ps1 stages PDFium's LICENSE and bundled licence files flat for the MSI and the portable ZIP, tags the cache with the pinned release, and verifies freshly extracted DLLs.
- ci.yml provisions the pinned PDFium for the Windows integration leg and requires it there; local runs still skip explicitly.
The active document can change after `sync_views` and before the canvas
paints. `patch_replaces_selection` now also checks that the drag was
pressed on the active document, so a stale Patch or Content-Aware Move
drag no longer hides the new document's selection outline for that frame.
A fold's layers were stacked by how far the warp moved them, so the part
dragged furthest was on top. That's right for a corner, an edge or an
edge's handles dragged across the picture, but not for the middle pulled
out past an edge: there the edge row folds back over the middle and lies
on top of it. The cells a fold turns over (their outline mirrored from
where they'd be without the warp) now go on top, like a folded-back flap,
and the cells moved furthest still go on top within each kind.
cell_order takes the warped and rest positions so it can tell; the render
and Warp mode's preview both use it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
The issue leaves a right-click during an ⌥-drag unmeasured, so it keeps
today's behaviour. `magnetic_drawing` held that menu back too; it now
skips a freehand segment.
Same reasoning as the wintab-sys pin in #11331: PDFium is FFI-loaded at run time, so a lockfile refresh must not move the wrapper under the pinned DLL release. Bump deliberately and re-check both the wrapper and the DLL release pin in packaging/windows/package.ps1.
- Process a closing segment's own geometry before marking the subpath closed, so a closing Bezier endpoint cannot leak control points into the next curve.
- Estimate retained memory from tile-aligned page bounds (including the page's X offset) instead of raw pixels: a 1 x 10,000 px page admits its 40 tiles, not 10,000 pixels.
- Sample text colour from the glyph ink (the pixel farthest from the box's dominant colour) instead of the bounds' top-left corner, which was usually background or antialiasing.
- Cache the PDFium bind: pdfium-render binds once per process, so a second PDF import in one session failed with PdfiumLibraryBindingsAlreadyInitialized.
- Add a PDFium-backed two-page end-to-end test with a transformed path on page 2 and non-origin red/green text at 72 and 300 dpi; it prints an explicit SKIPPED line when PDFium is unavailable.
- package.ps1: pin pdfium-binaries chromium/8138, verify the archive and any cached DLL against SHA-256, drop a stale bin/pdfium.dll before extraction and check tar's exit status.
In an RGB document the border now snaps to the edges of the visible composite
whichever layer is active; hidden layers add none. Other modes keep following
the active layer's pixels.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A save's temporary file keeps at most the first 64 characters of the
document's name, and older versions put one dot in front of them. A name
with a longer part before the process id and counter was still recognised
as a leftover, so the recovery sweep could delete someone else's file a
day later. Only a part a save can write is recognised now, counted in
characters as the save cuts it.
WM_POINTERENTER is sent, not posted, so only WH_CALLWNDPROC sees it; it
now reads the pen end like an update, so a pen held still after entering
range on its eraser end selects the Eraser.
A contact's end is kept past WM_POINTERLEAVE until the UI reads it once
(take_pen_end): an eraser-end tap and the pen leaving range, all handled
before the next frame, now erase instead of using the previous tool.
#11005's new head adds path.toShape to the vector-path list next to
path.stroke; the batch's 95c7a5d17e had added it next to path.set. Both
merged cleanly into a duplicate or-pattern; keep the contributor's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Paths on page 2+ were placed without the page's document X offset; text and paths now share PageFrame::to_doc, which applies the DPI scale, the Y flip and the page offset in one place.
- Flip Y in pixels and round once, so text placement, text colour sampling and path points all stay in the same coordinate system.
- Add unit tests for 72/300 dpi, the page-2 offset and the sampled colour; they need no PDFium.
The issue lists the files this item may touch and leaves the parity docs
to its epic. The right-click check moves from magnetic_lasso_ui.rs to
canvas_tool_menu.rs as magnetic_drawing, where the issue allows it, with
the same document check. magnetic_lasso_ui.rs and
docs/context-menu-parity.md are back as on main.
The bar draws inside the canvas pass, whose write-back of its own camera
dropped the fit that commit_crop asks for, so Done kept the old zoom. The
stored view now wins when the bar changed it, as a view menu row's does.
done_fits_the_cropped_document starts at 50 % and fails without the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The side band asks on every hover frame whether another shape is under the
pointer, and the pick sampled every shape layer's curves to find out. It now
skips that sampling for a shape whose control-point box, grown by the pick
tolerance, doesn't hold the point, since none of its outline can be in reach
there. What it picks is unchanged, Path Selection's clicks included; a test
pins hits just past a shape's box and on a stroke's pixels past its path.
The right-click check asked only whether a border existed. Over the
control channel no frame runs between events, so a border left on one
document stayed in place after a switch and kept the selection menu
from opening on the next. The check, now magnetic_lasso_ui::drawing,
also asks that the border belongs to the document in front, the same
test frame() uses to drop a stale border. The canvas, the control
channel and frame() share it.
agent_right_click_on_another_document_still_opens_the_selection_menu
fails without this change. The context-menu parity doc records the
behaviour.
The recovery sweep deletes files it recognises as a save's temporary file.
A name whose counter is longer than the 64-bit counter a save counts with,
or whose process id or counter starts with a zero, was still recognised,
so the sweep could delete a file no save wrote. Only the numbers a save
writes are recognised now.
* fix(export): preserve full JPEG chroma in Export As
* style(ui): simplify blend preview condition for Clippy
* test(export): verify full JPEG chroma at every quality
Exercise real JPEG export and decode at five qualities across U8, U16 and F32. Read all sampling factors from the main frame while skipping metadata segments and embedded thumbnails. Keep the colour-error limit at quality 100 and verify that the layered source is unchanged.
* Keep JPEG regression compatible with current Clippy
Restore the upstream blend-preview and IME predicates, removing unrelated lint-only changes. Use array chunks in the JPEG colour-error assertion for current stable Clippy.
* Use quality-dependent JPEG sampling in Export As
Keep 4:2:0 through quality 50 and full 4:4:4 above it, using the existing percentage-scale cutoff from Save for Web. Photoshop 27.11 modern Export As measurements show 4:2:0 at levels 1-4 and 4:4:4 at 5-7; no exact numerical mapping of the two scales is claimed.
Exercise both sampling regimes through 15 real JPEG exports across U8/U16/F32, check all percentage qualities in settings, and retain the Save As default. Boundary mutations fail at 50 and 51 as expected.