X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fpixmap.h;fp=src%2Fpixmap.h;h=02a848b6f83815b9ad2ca3203b2e65b37247fa94;hb=5449bf8fbca1d2cfbefa0386df7109afb2a5aa34;hp=0000000000000000000000000000000000000000;hpb=094e53b80e5576db6c86bb7dc6141b0cff7fa665;p=winnie diff --git a/src/pixmap.h b/src/pixmap.h new file mode 100644 index 0000000..02a848b --- /dev/null +++ b/src/pixmap.h @@ -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_