mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
PDFViewer: Support a continuous page view mode
This commit is contained in:
parent
091c2cfdca
commit
3ecb41b7d9
5 changed files with 196 additions and 49 deletions
|
@ -38,8 +38,8 @@ Renderer::Renderer(RefPtr<Document> document, Page const& page, RefPtr<Gfx::Bitm
|
|||
Gfx::AffineTransform userspace_matrix;
|
||||
userspace_matrix.translate(media_box.lower_left_x, media_box.lower_left_y);
|
||||
|
||||
float width = media_box.upper_right_x - media_box.lower_left_x;
|
||||
float height = media_box.upper_right_y - media_box.lower_left_y;
|
||||
float width = media_box.width();
|
||||
float height = media_box.height();
|
||||
float scale_x = static_cast<float>(bitmap->width()) / width;
|
||||
float scale_y = static_cast<float>(bitmap->height()) / height;
|
||||
userspace_matrix.scale(scale_x, scale_y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue