ImageData.hpp
Go to the documentation of this file.
1 
2 
3 
4 #ifndef GOSU_IMAGEDATA_HPP
5 #define GOSU_IMAGEDATA_HPP
6 
7 #include <Gosu/Color.hpp>
8 #include <Gosu/GraphicsBase.hpp>
9 #include <Gosu/Fwd.hpp>
10 
11 namespace Gosu
12 {
16  struct GLTexInfo
17  {
18  int texName;
19  float left, right, top, bottom;
20  };
21 
27  class ImageData
28  {
29  // Non-copyable
30  ImageData(const ImageData&);
31  ImageData& operator=(const ImageData&);
32 
33  public:
35  {
36  }
37 
38  virtual ~ImageData()
39  {
40  }
41 
42  virtual int width() const = 0;
43  virtual int height() const = 0;
44 
45  virtual void draw(double x1, double y1, Color c1,
46  double x2, double y2, Color c2,
47  double x3, double y3, Color c3,
48  double x4, double y4, Color c4,
49  ZPos z, AlphaMode mode) const = 0;
50 
51  virtual const GLTexInfo* glTexInfo() const = 0;
52  virtual Bitmap toBitmap() const = 0;
53 
55  virtual void insert(const Bitmap& bitmap, int x, int y) = 0;
56  };
57 }
58 
59 #endif