-
Notifications
You must be signed in to change notification settings - Fork 15
/
pm_imagerotobox.h
47 lines (35 loc) · 910 Bytes
/
pm_imagerotobox.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* File : pm_imagerotobox.h
* COPYRIGHT (C) 2012-2017, Shanghai Real-Thread Technology Co., Ltd
*
* Change Logs:
* Date Author Notes
* 2017-11-05 realthread the first version
*/
#pragma once
#include <pm_widget.h>
#include <pm_timer.h>
#include <sigslot.h>
namespace Persimmon
{
class ImageRotoBox : public Widget
{
public:
ImageRotoBox(const char* img_name);
virtual ~ImageRotoBox();
void start(int once_ticks, int frame, bool once = true);
void stop(void);
Signal<void> finished;
virtual void render(struct rtgui_dc* dc, const Point &dcPoint = Point(),
const Rect &srcRect = Rect(),
RenderFlag flags = DrawNormal);
private:
void timeout(void);
protected:
struct rtgui_dc *img_dc;
Timer *timer;
int coord_x, coord_y, frame;
double roto_degree;
bool roto_mode;
};
}