mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-14 14:22:39 +00:00
Apply review fixes
- crates/render/src/driver.rs - crates/render/src/fx.rs
This commit is contained in:
1 parent
4b06bb219c
commit
229abafbe6
2 files changed
+5
-4
No files matched your search
@@ -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]));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user