00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00024 #ifndef __ze_zimage_h__
00025 #define __ze_zimage_h__
00026 
00027 #include "ZE_ZObject.h"
00028 
00029 namespace ZE
00030 {
00031 
00037 class ZImage : public ZObject
00038 {
00039     protected:
00041         GLfloat rTexMinX;
00043         GLfloat rTexMinY;
00045         GLfloat rTexMaxX;
00047         GLfloat rTexMaxY;
00049         SDL_Surface *rImage;
00051         unsigned int rTexID;
00053         unsigned int rWidth;
00055         unsigned int rHeight;
00056     
00057     public:
00058 
00064         ZImage();
00065 
00072         ZImage(string filename);
00073 
00080         ZImage(SDL_Surface *surface);
00081 
00093         ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00094 
00100         ~ZImage();
00101 
00103         
00105 
00112         void Open(string filename);
00113 
00125         void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00126 
00133         void Attach(SDL_Surface *surface);
00134 
00140         void Release();
00141 
00143         
00145 
00154         void SetColorKey(Uint8 red, Uint8 green, Uint8 blue);
00155 
00163         void Flip(bool horizontal, bool vertical);
00164 
00172         void Stretch(float xFactor, float yFactor);
00173 
00181         void Resize(unsigned int width, unsigned int height);
00182 
00189         void Bind();
00190 
00198         void Draw(float x, float y);
00199 
00208         void DrawRotated(int x, int y, float angle);
00209 
00211         
00213 
00220         bool IsLoaded();
00221 
00227         SDL_Surface *Surface();
00228 
00235         int Width();
00236 
00243         int Height();
00244 };
00245 
00246 }
00247 
00248 #endif