Scope XDV PDF content at the driver page origin

This commit is contained in:
gloamxun committed 2026-11-28 07:25:57 +08:00
1 parent ab6b1093ec
commit 526ec9b3b0
9 files changed
+176 -46

No files matched your search

+3 -2
View File
@@ -41,10 +41,11 @@ impl NativeText {
let state = text.get_or_insert_with(|| {
out.push_str("BT\n");
if let Some(origin) = xdv_origin {
let [h, v] = out.origin.position();
out.push_str(&format!(
"1 0 0 1 {} {} Tm\n",
print_sp(origin, digits),
print_sp(height - origin, digits),
print_sp(origin - h, digits),
print_sp(height - origin - v, digits),
));
}
Self {