blob: a7df2c653c59c23352e8cc6f79eb8ae9e2f7368d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* Copyright (c) 2021, Valtteri Koskivuori <vkoskiv@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/Frame.h>
class MagnifierWidget final : public GUI::Frame {
C_OBJECT(MagnifierWidget);
public:
virtual ~MagnifierWidget();
void set_scale_factor(int scale_factor);
void track_cursor_globally();
private:
MagnifierWidget();
virtual void paint_event(GUI::PaintEvent&) override;
void sync();
int m_scale_factor { 2 };
RefPtr<Gfx::Bitmap> m_grabbed_bitmap;
};
|