diff --git a/crates/render/src/driver.rs b/crates/render/src/driver.rs index b9568a595..cee99590c 100644 --- a/crates/render/src/driver.rs +++ b/crates/render/src/driver.rs @@ -46,6 +46,7 @@ impl Renderer { let (width, height) = size; RICH_BLACK.with(|r| r.set(opts.rich_black)); PLATE.with(|p| p.set(opts.plate)); + self.kept.begin(doc); if let Some(hit) = self.cmyk_view.as_ref().filter(|entry| entry.matches(doc, spreads, width, height, view, opts, self.threads)) { let image = hit.image(); self.stats = hit.stats(); @@ -90,7 +91,6 @@ impl Renderer { self.stats = FrameStats::default(); self.stories.clear(); self.glyphs.tick(); - self.kept.begin(doc); if let Some(bg) = opts.background { ctx.set_transform(Affine::IDENTITY); ctx.set_paint(peniko::Color::from_rgba8(bg[0], bg[1], bg[2], bg[3])); diff --git a/crates/render/src/fx.rs b/crates/render/src/fx.rs index 44513c3ac..5248bf9ba 100644 --- a/crates/render/src/fx.rs +++ b/crates/render/src/fx.rs @@ -513,7 +513,8 @@ impl Renderer { return; } let [a, b, c, d, e, g] = (f.view * xf).as_coeffs(); - let (linear, anchor) = ([a, b, c, d], Vec2::new(e, g)); + let [va, vb, vc, vd, _, _] = f.view.as_coeffs(); + let (linear, anchor) = ([a, b, c, d, va, vb, vc, vd], Vec2::new(e, g)); let plate = crate::PLATE.with(std::cell::Cell::get); let rich_black = crate::color::RICH_BLACK.with(std::cell::Cell::get); let key = (it.id, page, look.slot, plate); @@ -606,8 +607,8 @@ struct Look { struct Kept { /// The object, with the transform it had. item: Item, - /// The linear part of the object's spread → device transform. - linear: [f64; 4], + /// The linear parts of the object's spread → device transform and of the view (the effect offset turns with the view). + linear: [f64; 8], /// The device position of the object's origin. anchor: Vec2, look: Look,