Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/include/ZE_ZImage.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002          This file is Part of the ZEngine Library for SDL Game Development.
00003                       Copyright (C) 2002 ConceptOfZero.net
00004 
00005              Licensed under the BSD License, see licensing.txt.
00006 
00007     The maintainer of this library is James Turk (jturk@conceptofzero.net) 
00008          and the home of this Library is http://www.conceptofzero.net/
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 rTexMaxX;
00043         GLfloat rTexMaxY;
00045         SDL_Surface *rImage;
00047         unsigned int rTexID;
00049         unsigned int rWidth;
00051         unsigned int rHeight;
00052     
00053     public:
00054 
00060         ZImage();
00061 
00068         ZImage(string filename);
00069 
00076         ZImage(SDL_Surface *surface);
00077 
00089         ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00090 
00096         ~ZImage();
00097 
00099         //Opening and Closing//
00101 
00108         void Open(string filename);
00109 
00121         void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00122 
00129         void Attach(SDL_Surface *surface);
00130 
00136         void Release();
00137 
00139         //Graphics//
00141 
00150         void SetColorKey(Uint8 red, Uint8 green, Uint8 blue);
00151 
00158         void Bind();
00159 
00167         void Draw(int x, int y);
00168 
00170         //Accessors//
00172 
00179         bool IsLoaded();
00180 
00186         SDL_Surface *Surface();
00187 
00194         int Width();
00195 
00202         int Height();
00203 };
00204 
00205 }
00206 
00207 #endif

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.2.18