Commit Graph
263 Commits
Author SHA1 Message Date
Codex fe631061db Use mutable row iteration in render fixture 2026-11-12 19:49:14 +01:00
FredApps 113d196168 Merge pull request #2668 from dotCooCoo/fix/feathered-inner-effects
Render: a feathered object's bevel and inner effects fade with it
2026-11-12 19:40:26 +01:00
FredApps 3bdae7cec1 Merge main and preserve PR #2668 behavior 2026-11-12 18:14:28 +01:00
FredApps 2348380198 Merge main and preserve PR #2663 behavior 2026-11-12 18:14:28 +01:00
FredApps 65dd56d7a6 Merge pull request #2671 from dotCooCoo/fix/satin-follows-image-edge
Render: satin and center inner glow on an image follow its painted edge
2026-11-12 18:06:50 +01:00
FredApps 04597b0652 Merge pull request #2657 from dotCooCoo/fix/keep-shadow-images
Render: keep drop shadow and outer glow images while an object moves
2026-11-12 18:06:07 +01:00
dotCooCoo 092c46c148 Render: list layers among the kept shadow image's dependencies
The doc comment on with_kept_filters now names the document's layers next to its colors, styles and images, as Deps holds them.
2026-11-12 07:39:06 -08:00
dotCooCoo 5932810b1f Render: a center inner glow on an image fades around small transparent holes
The coverage was eroded by sampling two rings of points, which could miss a hole smaller than the gaps between them. Erosion now takes the smallest alpha within an octagon of the band's radius, in four passes along the axes and the diagonals.
2026-11-12 00:04:46 -08:00
dotCooCoo 7af4d75539 Render: plain satin with no distance on an image is not drawn
Both shifted copies are the same at distance 0, so the coverage mask is empty. The effect is now skipped before the image is drawn offscreen and scanned.
2026-11-12 00:00:46 -08:00
dotCooCoo c3a7deb21a Render: satin on an image compares partial coverage
Satin on a frame holding a graphic draws the object's coverage once
offscreen and compares the two shifted copies pixel by pixel, taking the
difference of their coverages. A partly transparent area that both copies
cover equally gets no plain satin, so a uniformly half-transparent image
no longer shows satin across its middle. Inverted satin keeps the
object's coverage where the copies agree.

The offscreen coverage for satin and for a center inner glow on a graphic
now covers its whole area at a lower resolution when it would be wider
than the largest raster side or hold more than 4096 x 4096 pixels.
2026-11-11 23:23:50 -08:00
dotCooCoo 7a5924e971 Render: center inner glow on an image follows its painted edge
Inner glow from the center on a frame holding an image filled the
frame's shape, so it painted over the transparent parts of the image.
It now draws the object's coverage once offscreen, shrinks it by the
glow's band, colors and blurs it, and keeps the result to the painted
pixels. Partly transparent pixels keep their coverage.
2026-11-11 22:52:07 -08:00
dotCooCoo c9cc76e6ad CMYK view: the conversion returns the number of bands it converted
With more render threads than bands of 32 rows fit evenly, the rows split
into fewer bands than requested, and the returned count was the requested
one. It is now the number of bands converted.
2026-11-11 22:45:44 -08:00
dotCooCoo d20ffcc055 Render: satin on an image follows its painted edge
Satin on a frame holding an image used the frame's shape. Where the
image is transparent, the satin color multiplied over whatever lay
behind the frame, so text under a transparent part of the image turned
darker. Satin now builds its two offset copies from what the object
paints and keeps the result to the painted pixels, as the inner shadow,
inner glow and bevel already do.
2026-11-11 22:23:34 -08:00
dotCooCoo 23eb593498 Render: the feather test checks the inner effects still draw inside
The edge comparisons pass when a bevel or inner glow is not drawn at all.
A pixel inside the bevel and glow bands now has to differ from the same
object without the effect, for every feather kind.
2026-11-11 22:18:21 -08:00
dotCooCoo 6854997294 Render: a feathered object's bevel and inner effects fade with it
A basic, directional or gradient feather faded only the object's body. Its
bevel, inner glow, inner shadow and satin were drawn afterwards over the
whole shape, so where the feather let the page show through, the bevel's
highlight and the inner glow screened whatever lay behind the object.
Text under the feathered edge of a beveled frame turned lighter until the
frame was moved off it.

Each inner effect is now faded by the same feathers before it blends with
what is behind the object, so a feathered object fades to transparent at
its edge with its effects.
2026-11-11 21:53:45 -08:00
dotCooCoo 29f259bf07 Render: test that a turned view and snapshot renders handle kept shadows
A view turned 90 degrees with the frame turned back draws the shadow
again and matches a fresh render. Renders served from the CMYK viewport
snapshot drop kept images unused for 256 renders.
2026-11-11 19:54:23 -08:00
dotCooCoo 1fbb7e86b0 Merge #1084 (Alpha Channel text wrap) into main 2026-11-11 19:50:30 -08:00
autocraft-bot[bot] 229abafbe6 Apply review fixes
- crates/render/src/driver.rs
- crates/render/src/fx.rs
2026-11-12 03:43:53 +00:00
dotCooCoo 9c4c3730ab CMYK view: convert the blended inks to screen colours on the render threads
In the CMYK blend space view (Proof Colors off) every render converted
each pixel of the ink passes' area from the blended inks to a screen colour
on the calling thread, through a 16-entry lookup per pixel. With render
threads it now converts bands of rows on that many threads at once, at
least 32 rows a band. The colours are the same; the Wasm build and
single-threaded renders convert on one thread as before.
2026-11-11 19:42:30 -08:00
dotCooCoo 4b06bb219c Render: keep drop shadow and outer glow images while an object moves
The canvas drew and blurred every drop shadow and outer glow on every
render, also when the object or the view had only moved. Each image is now
kept per object, effect, page and ink pass, with the whole effect drawn
once. While the object (apart from its position), the effect, the view's
scale and rotation, the render options and the document's colours, styles,
layers and images stay the same, a move by whole device pixels places the
kept image again. Any other change draws it afresh.

Only multithreaded renders (the canvas) keep images, and only for objects
without text or nested items. Kept images are limited to 4 Mpx each and
128 MiB in all; the images used longest ago go first, and an image no render
placed in 256 renders is dropped.
2026-11-11 19:14:37 -08:00
Dylan M. Taylor 27d8eabb10 Render: clamp the blur size before the filter planner squares it (#2640)
* Render: a blur size is clamped to 1,000,000 pt before the filter planner squares it

* address review: bound effect extents and sigma before spread, padding and reach arithmetic
2026-11-12 00:33:50 +00:00
Dylan M. Taylorandaiongg 15bea9fa7a Tagged Text, RTF, EPUB classes and PDF layers: lookups by set or map instead of list searches (#2212)
* fix: index style, font, class and layer name lookups in exporters and importers

* Apply review fixes

- crates/epub/src/css.rs

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
2026-11-11 16:20:09 -05:00
Dylan M. Taylor ed3f45a57a render: cap the blend-area growth rounds, one name per optional-content layer (#2257) 2026-11-11 16:16:04 -05:00
Hamza Naveed 59501a26f9 An item a parent overrode and deleted is gone from the pages that use it (#1469) (#1558)
* An item a parent overrode and deleted is gone from the pages that use it (#1469)

In InDesign, removing an inherited item from a parent page means overriding
it there and deleting the override: the parent's page keeps the item in its
override list with no copy of its own. Only the page being drawn was checked,
so the pages that use that parent still drew the base's item -- a signature
block from parent B over the notice text of every page using parent E.

The override lists of the whole parent chain are checked, not just the page's
own. An override always names an item of a parent further back, so one set
covers the chain.

Rebased onto the post-split main: the parent-item loop moved from render's
lib.rs to draw.rs and the tests to tests.rs.

One thing this does not touch: blendspace.rs checks `page.overridden` the same
way in two places, for deciding which spreads hold transparency. A deleted
override there would count an absent item as present, which can only cost an
unnecessary flatten rather than draw the wrong thing, so it is left for a
maintainer to judge rather than widened into this fix.

* Parent items: one set of overridden items for drawing, PDF and PPTX export, hit-testing, snapping and frame edges

* Override All: an item a parent removed is not brought back as a copy
2026-11-05 22:22:47 +01:00
aiongg b1f67ee4e4 Merge pull request #2211 2026-11-04 04:14:12 +00:00
Dylan M. Taylor 64c956f09e fix(render): index line style groups, stop futile glyph-cache eviction, read PDF page sizes once (#2217) 2026-11-03 22:23:11 -05:00
Dylan M. Taylor edbea6036f fix: bound recent-file preview decoding and PDF crop allocation 2026-11-03 12:28:30 +00:00
NetterSilverandClaude Opus 5.5 001053e0dd Fix dotted strokes dropping most of their dots
Fixes #1950

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 03:07:22 +01:00
aiongg 7d16fffb39 Integration: #1451 screened outer glows and blended shadows isolate the spread from the paper 2026-10-31 00:35:26 +00:00
moppeeerandClaude Opus 5.5 8c89bf5f1a rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:40:44 +01:00
moppeeer 3711ac05ba Merge remote-tracking branch 'origin/main' into effect-blend-modes
# Conflicts:
#	crates/render/src/fx.rs
2026-10-30 21:57:48 +01:00
Brandon Thomas a1e9bea41b Merge storytold/main into PR #1879 2026-10-29 21:55:46 -04:00
Brandon Thomas a8c92bb960 Merge storytold/main into PR #1879 2026-10-29 21:53:39 -04:00
Brandon Thomas e5b30c4527 Merge storytold/main into PR #1238 2026-10-29 21:53:38 -04:00
Brandon Thomas 2b15bf79a2 Merge pull request #1842 from Silvertree2010/fix/1835-document-not-updated-on-image-re
Repaint the canvas when a placed file is relinked or updated
2026-10-29 21:51:38 -04:00
Brandon Thomas af284b8bd8 Merge remote-tracking branch 'origin/main' into HEAD 2026-10-29 21:40:31 -04:00
moppeeer 7c3dcd1d9f Merge remote-tracking branch 'origin/main' into codex/alpha-text-wrap
# Conflicts:
#	crates/compose/src/lib.rs
#	crates/doc/src/item.rs
#	crates/engine/src/lib.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/panels/properties.rs
2026-10-29 12:06:13 +01:00
moppeeer b6fec896f9 Merge remote-tracking branch 'origin/main' into effect-blend-modes
# Conflicts:
#	crates/doc/src/item.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/effects_dialog.rs
2026-10-29 11:42:14 +01:00
Claude 5c6909db46 Merge storytold/main (v0.14.0) into inline-objects-under-text
The PDF change moves to export/walk.rs (draw_leaf_content passes the drawn flag back) and the
render test to render/src/tests.rs, with upstream's splits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-28 18:03:03 +00:00
Dylan M. Taylor 072dd02f73 Refactor render for strict Clippy checks 2026-10-28 11:39:26 +00:00
aiongg 27e21ba19a refactor(render): split lib.rs into modules 2026-10-26 23:05:57 +00:00
aiongg 6e078e1167 refactor(render): move the tests module of lib.rs to tests.rs 2026-10-26 18:18:13 +00:00
PiMinusMaxandClaude Opus 5.5 13013b09d0 Effects: inner shadow, glow and bevel follow a transparent image's edge
On a frame holding a graphic, Inner Shadow, Inner Glow (from the edges) and Bevel and Emboss are built from what the object paints instead of the frame's path: the colour everywhere but under the painted pixels moved by the offset, blurred, and kept only where the object paints. A transparent part of an image is outside the object, so the effect lines the image's opaque edge; before, it lined the frame and nothing marked the image's own edge. Frames without a graphic draw as before. Satin and a centred Inner Glow still follow the frame.

Fixes #1622.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:13:10 +01:00
aiongg d90881a8a9 Merge branch 'print-color' into print-color-separations
# Conflicts:
#	Cargo.toml
2026-10-26 01:11:35 +00:00
NetterSilverandClaude Opus 5.5 b390324c1f Repaint the canvas when a placed file is relinked or updated
Fixes #1835

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:48:25 +00:00
Dylan M. TaylorandClaude Sonnet 5.5 8e77e8db2d refactor: split complex functions in swatch_refs, xlsx, render group drawing (Sonar S3776) (#1733)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:33:59 -04:00
aiongg 9c977f41a6 Merge print-color (#1374 with main: egui 0.37, craft-libs e3b9e239) into print-color-separations
print_pdf, shared by Export PDF, File › Print and Separations Preview, takes main's two
changes to the inline export pipeline: rasterize_layered runs only for PDF/A-2b (other
standards keep hidden placed-PDF layers as optional content), and the report gets
GRAPHIC_LAYER_RENDERING_WARNING when the source document has graphic layer visibility
overrides and the writer did not report it. The Separations Preview command matches
craft_prepress::Conversion with a fallback arm, since the enum is non-exhaustive at
craft-libs e3b9e239.
2026-10-25 19:54:40 +00:00
aiongg 02cb2876d2 Merge upstream main into docking-trial
Main's File Info PDF metadata gets craft-pdf's modified field (None, as before), and the
Notes panel ids use Id::unique (egui 0.37).
2026-10-25 17:52:22 +00:00
Brandon Thomas fffe2fdc3d Merge pull request #1768 from alichaudhry55/fix/table-gradient-fills
Tables: gradient cell fills draw as gradients on screen and in PDF
2026-10-25 12:26:38 -04:00
Brandon Thomas 743eced7ba Merge pull request #1712 from dotCooCoo/feat/file-info
File Info: PDF export writes the document's title, author, description and keywords
2026-10-25 12:26:32 -04:00