Paint insertion material in route-D display lists
This commit is contained in:
1 parent
8b33051355
commit
159bb6a386
3 files changed
+35
-1
No files matched your search
@@ -1347,6 +1347,30 @@ mod tests {
|
||||
let pdf = crate::pdf::display_list_to_pdf(&list, 792 * 65_536);
|
||||
assert!(String::from_utf8_lossy(&pdf).contains("0.5 g 10 10 20 20 re f"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn insertion_contents_reach_the_display_list() {
|
||||
let page = Page {
|
||||
items: vec![VerticalItem::Insertion(Insertion {
|
||||
class: 0,
|
||||
height: 20 * 65_536,
|
||||
items: vec![VerticalItem::Rule {
|
||||
width: 100 * 65_536,
|
||||
height: 2 * 65_536,
|
||||
}],
|
||||
})],
|
||||
insertions: Vec::new(),
|
||||
marks: Vec::new(),
|
||||
floats: Vec::new(),
|
||||
sources: Vec::new(),
|
||||
hash: 0,
|
||||
};
|
||||
let list = page.display_list();
|
||||
assert!(list.items.iter().any(|item| matches!(
|
||||
item,
|
||||
crate::render::DisplayItem::Rule { width, .. } if *width == 100 * 65_536
|
||||
)));
|
||||
}
|
||||
#[test]
|
||||
fn link_rectangles_become_pdf_annotations() {
|
||||
use crate::render::DisplayList;
|
||||
|
||||
Reference in new issue
Block a user