erebus

view liberebus/src/image.h @ 37:db8a90307386

implemented console and rudimentary commandline parser
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 09 Jun 2014 16:01:00 +0300
parents 4abdce1361b9
children
line source
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
4 template <typename T>
5 class Image {
6 private:
7 int width, height;
8 T *pixels;
9 bool own_pixels;
11 public:
12 Image();
13 ~Image();
15 Image(const Image &img);
16 Image &operator =(const Image &img);
18 Image(const Image &&img);
19 Image &&operator =(const Image &&img);
21 void create(int xsz, int ysz, const T *pix = 0);
22 void destroy();
24 int get_width() const;
25 int get_height() const;
27 void set_pixels(int xsz, int ysz, T *pix);
28 T *get_pixels() const;
30 void clear();
32 bool load(const char *fname);
33 };
35 #include "image.inl"
37 #endif // IMAGE_H_