-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpm_image.h
43 lines (33 loc) · 837 Bytes
/
pm_image.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
/*
* File : pm_image.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 <rtgui/image.h>
#include <rtgui/image_container.h>
#include <pm_rect.h>
namespace Persimmon
{
class Image
{
public:
Image(const char* filename, rt_bool_t load = RT_TRUE);
virtual ~Image();
void getRect(Rect& rect);
int getWidth();
int getHeight();
struct rtgui_image* getImage(void);
void loadImage(const char *filename);
virtual void render(struct rtgui_dc* dc, const Point& point);
virtual void render(struct rtgui_dc* dc, const Rect& rect);
protected:
struct rtgui_image* image;
#ifdef RTGUI_IMAGE_CONTAINER
struct rtgui_image_item* item;
#endif
};
}