aebec700619fae9ca301b36318fb19104782d643
[winnie] / src / pixmap.h
1 #ifndef PIXMAP_H_
2 #define PIXMAP_H_
3
4 #include "geom.h"
5
6 class Pixmap {
7 public:
8         int width, height;
9         unsigned char *pixels;
10
11         Pixmap();
12
13         Pixmap(const Pixmap &pixmap);
14         Pixmap &operator=(const Pixmap& pixmap);
15
16         ~Pixmap();
17
18         int get_width() const;
19         int get_height() const;
20         Rect get_rect() const;
21
22         bool set_image(int x, int y, unsigned char *pix = 0);
23         const unsigned char *get_image() const;
24         unsigned char *get_image();
25
26         bool load(const char *fname);
27         bool save(const char *fname) const;
28 };
29
30 #endif  // PIXMAP_H_