erebus

view liberebus/src/image.h @ 47:4b91c9a501d8

minor fix of strange code structure in the thread func
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 01 Feb 2016 14:56:15 +0200
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_