mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:27:35 +00:00
Magnifier: Add timeline for easy checking of animations
This patch adds a 512 frame timeline to Magnifier and the ability to step through it with the arrow keys. This makes it easier to check Serenity animations frame by frame for correctness etc.
This commit is contained in:
parent
58ec2f688b
commit
5238308d6f
3 changed files with 44 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/CircularQueue.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
class MagnifierWidget final : public GUI::Frame {
|
||||
|
@ -14,7 +15,14 @@ class MagnifierWidget final : public GUI::Frame {
|
|||
public:
|
||||
virtual ~MagnifierWidget();
|
||||
void set_scale_factor(int scale_factor);
|
||||
void pause_capture(bool pause) { m_pause_capture = pause; }
|
||||
void pause_capture(bool pause)
|
||||
{
|
||||
m_pause_capture = pause;
|
||||
if (!pause)
|
||||
m_frame_offset_from_head = 0;
|
||||
}
|
||||
void display_previous_frame();
|
||||
void display_next_frame();
|
||||
|
||||
private:
|
||||
MagnifierWidget();
|
||||
|
@ -25,5 +33,7 @@ private:
|
|||
|
||||
int m_scale_factor { 2 };
|
||||
RefPtr<Gfx::Bitmap> m_grabbed_bitmap;
|
||||
CircularQueue<RefPtr<Gfx::Bitmap>, 512> m_grabbed_bitmaps {};
|
||||
ssize_t m_frame_offset_from_head { 0 };
|
||||
bool m_pause_capture { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue