conworlds
view src/image.h @ 18:e4257df067a1
oh yeah, now the tracking is solid. Wasn't rendering the correct part of the texture before.
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 26 Aug 2014 12:59:15 +0300 |
parents | b326d53321f7 |
children |
line source
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
4 class Image {
5 private:
6 int width, height;
7 unsigned char *pixels;
8 bool own_pixels;
10 public:
11 Image();
12 ~Image();
14 Image(const Image &img);
15 Image &operator =(const Image &img);
17 void create(int xsz, int ysz, unsigned char *pix = 0);
18 void destroy();
20 int get_width() const;
21 int get_height() const;
23 void set_pixels(int xsz, int ysz, unsigned char *pix);
24 unsigned char *get_pixels() const;
26 bool load(const char *fname);
27 };
29 #endif // IMAGE_H_