* in progress *
[winnie] / src / pixmap.h
diff --git a/src/pixmap.h b/src/pixmap.h
new file mode 100644 (file)
index 0000000..02a848b
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef PIXMAP_H_
+#define PIXMAP_H_
+
+#include "geom.h"
+
+class Pixmap {
+private:
+       int width, height;
+       unsigned char *pixels;
+
+public:
+       Pixmap();
+       ~Pixmap();
+
+       int get_width() const;
+       int get_height() const;
+       Rect get_rect() const;
+
+       bool set_image(int x, int y, unsigned char *pix = 0);
+       const unsigned char *get_image() const;
+       unsigned char *get_image();
+
+       bool load(const char *fname);
+       bool save(const char *fname) const;
+};
+
+#endif // PIXMAP_H_