mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
PDFViewer: Add actions to rotate the displayed PDF
This implements the rotate cw/ccw actions in PDFViewer. Since the rendered pages are stored in a HashMap for caching, the bitmap is wrapped in a struct with the current rotation. This way the caching works as expected while zooming, and a new bitmap is rendered when the page is rotated.
This commit is contained in:
parent
cecbed467b
commit
eb97617ff0
4 changed files with 36 additions and 7 deletions
|
@ -38,6 +38,8 @@ private:
|
|||
RefPtr<GUI::Action> m_zoom_in_action;
|
||||
RefPtr<GUI::Action> m_zoom_out_action;
|
||||
RefPtr<GUI::Action> m_reset_zoom_action;
|
||||
RefPtr<GUI::Action> m_rotate_counterclockwise_action;
|
||||
RefPtr<GUI::Action> m_rotate_clockwise_action;
|
||||
|
||||
bool m_sidebar_open { false };
|
||||
ByteBuffer m_buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue