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 ImageData rImage;
00042 public:
00043
00049 ZImage();
00050
00057 ZImage(string filename);
00058
00065 ZImage(SDL_Surface *surface);
00066
00078 ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00079
00085 ~ZImage();
00086
00088
00090
00097 void Open(string filename);
00098
00110 void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00111
00118 void Attach(SDL_Surface *surface);
00119
00125 void Release();
00126
00128
00130
00137 void SetAlpha(Uint8 alpha);
00138
00145 void SetColorKey(Uint32 color);
00146
00154 void Draw(Sint16 x, Sint16 y);
00155
00157
00159
00166 bool IsLoaded();
00167
00173 SDL_Surface *GetImage();
00174
00181 int GetWidth();
00182
00189 int GetHeight();
00190
00197 string GetFilename();
00198 };
00199 }
00200
00201 #endif //__ze_zimage_h__