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