mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
PR #14413: the Include Background tests export Artboard Content Only
Red and Blue Board overlap in the test document. Include Overlapping Areas, the default since #14381, puts Blue Board's pixels on the Red Board page, so the tests, written before it, now ask for Artboard Content Only unless they set the content themselves. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c9d5892806
commit
e33b62659d
1 file changed
+5
@@ -38,6 +38,11 @@ fn export(s: &mut Session, tag: &str, params: Value) -> Vec<u8> {
|
||||
let path = std::env::temp_dir().join(format!("photocraft-abpdf-bg-{}-{tag}.pdf", std::process::id()));
|
||||
let mut p = params;
|
||||
p["path"] = json!(path.to_string_lossy());
|
||||
// Artboard Content Only unless a test says otherwise: Red and Blue Board overlap, and Include Overlapping Areas
|
||||
// (#13646, the default) would put Blue Board's pixels on the Red Board page.
|
||||
if p.get("content").is_none() {
|
||||
p["content"] = json!("artboard");
|
||||
}
|
||||
s.execute("file.export.artboardsToPdf", p).unwrap();
|
||||
let bytes = std::fs::read(&path).unwrap();
|
||||
let _ = std::fs::remove_file(&path);
|
||||
|
||||
Reference in new issue
Block a user