ImageData.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 #ifndef GOSU_IMAGEDATA_HPP
00005 #define GOSU_IMAGEDATA_HPP
00006 
00007 #include <Gosu/Color.hpp>
00008 #include <Gosu/GraphicsBase.hpp>
00009 #include <Gosu/Fwd.hpp>
00010 
00011 namespace Gosu
00012 {
00016     struct GLTexInfo
00017     {
00018         int texName;
00019         float left, right, top, bottom;
00020     };
00021 
00027     class ImageData
00028     {
00029         // Non-copyable
00030         ImageData(const ImageData&);
00031         ImageData& operator=(const ImageData&);
00032         
00033     public:
00034         ImageData()
00035         {
00036         }
00037         
00038         virtual ~ImageData()
00039         {
00040         }
00041 
00042         virtual int width() const = 0;
00043         virtual int height() const = 0;
00044 
00045         virtual void draw(double x1, double y1, Color c1,
00046             double x2, double y2, Color c2,
00047             double x3, double y3, Color c3,
00048             double x4, double y4, Color c4,
00049             ZPos z, AlphaMode mode) const = 0;
00050             
00051         virtual const GLTexInfo* glTexInfo() const = 0;
00052         virtual Bitmap toBitmap() const = 0;
00053         
00055         virtual void insert(const Bitmap& bitmap, int x, int y) = 0;
00056     };
00057 }
00058 
00059 #endif