Emit native PDF literals at scan and shipout boundaries

This commit is contained in:
gloamxun committed 2026-11-21 02:03:25 +08:00
1 parent 13ab32247d
commit 432c1d2ba7
21 files changed
+264 -61

No files matched your search

+6 -1
View File
@@ -301,7 +301,11 @@ impl DisplayList {
|| self
.items
.iter()
.any(|item| matches!(item, DisplayItem::PdfImage { .. }))
.any(|item| matches!(item, DisplayItem::PdfImage { .. }
| DisplayItem::PdfGraphics {
operation: crate::pdf_device::PdfGraphics::Literal { .. },
..
}))
}
/// Compare the inputs consumed by SVG rendering. Font data for glyphs not
@@ -653,6 +657,7 @@ impl DisplayList {
DisplayItem::PdfGraphics { x, y, operation } => {
use crate::pdf_device::PdfGraphics;
match operation {
PdfGraphics::Literal { .. } => unreachable!("PDF literal requires PDF rendering"),
PdfGraphics::Save => {
graphics.push((
open_transforms,