Restore registered pdfTeX images from native formats
This commit is contained in:
1 parent
1307bbcf0c
commit
c2f18f50dc
14 files changed
+667
-49
No files matched your search
@@ -1144,11 +1144,19 @@ fn page_content(
|
||||
crate::pdf_image::real(list.units.bp(*image_height) / natural_height),
|
||||
]
|
||||
};
|
||||
let [dx, dy] = image.image.restored_pdf_origin.map_or([0, 0], |origin| {
|
||||
let placed = [*width, *image_height];
|
||||
std::array::from_fn(|axis| {
|
||||
crate::pdf_device::divide_scaled(
|
||||
placed[axis] * origin[axis], image.image.natural[axis], 0,
|
||||
).0
|
||||
})
|
||||
});
|
||||
let name = image.id;
|
||||
content.push_str(&format!(
|
||||
"q {sx} 0 0 {sy} {} {} cm /PI{name} Do Q\n",
|
||||
px(*x),
|
||||
py(*y + *image_height)
|
||||
px(*x - dx),
|
||||
py(*y + *image_height + dy)
|
||||
));
|
||||
}
|
||||
DisplayItem::Frame {
|
||||
|
||||
Reference in new issue
Block a user