-// Transformed page
-
-class xform_page : public page {
- page *orig_page;
- pdf_matrix xform;
-public:
- void render(out_context *out, pdf_matrix xform) override;
- void debug_dump() override
- {
- debug("Transform [%s]", xform.to_string().c_str());
- orig_page->debug_dump();
- }
- xform_page(page *p, pdf_matrix xf);
-};
-
-xform_page::xform_page(page *p, pdf_matrix xf)
-{
- orig_page = p;
- index = p->index;
- xform = xf;
-
- BBox media(p->width, p->height);
- media.transform(xf);
- width = media.width();
- height = media.height();
-
- image_box = p->image_box;
- image_box.transform(xf);
-}
-
-void xform_page::render(out_context *out, pdf_matrix parent_xform)
-{
- orig_page->render(out, xform * parent_xform);
-}
-