mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 21:57:12 -06:00
PDF/EPS export: EPS export and PostScript printing expand pattern tile images once
EPS export expanded the pattern fills whose tile images need flattening and then flattened the result with flatten_document, which expanded them again with a new object limit. PostScript printing did the same, on the layers shown rather than the layers that print. EPS export now flattens the expanded document without expanding it again (flatten_expanded), and PostScript printing leaves the expansion to the flattener, which runs on the layers that print, and only checks for such pattern fills to warn.
This commit is contained in:
@@ -820,6 +820,15 @@ fn flattening_that_keeps_colorize_leaves_colorized_pattern_tile_images_alone() {
|
||||
assert!(crate::cmd::flatten::flatten_document(d, &o).unwrap().is_none(), "the pattern isn't expanded for a colorize paint alone");
|
||||
}
|
||||
|
||||
/// EPS export expands pattern tile images once: flattening the expanded
|
||||
/// document leaves the patterns the expansion kept, past its object limit, as they are.
|
||||
#[test]
|
||||
fn flattening_an_expanded_document_does_not_expand_patterns_again() {
|
||||
let s = colorized_pattern_over_blue();
|
||||
let d = &s.doc().unwrap().doc;
|
||||
assert!(crate::cmd::flatten::flatten_expanded(d, &crate::cmd::FlattenOptions::default()).unwrap().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn eps_flattens_colorized_image_in_a_see_through_pattern_tile_group_and_warns() {
|
||||
let mut s = colorized_pattern_over_blue();
|
||||
|
||||
Reference in New Issue
Block a user