CTGAImage.hpp

Go to the documentation of this file.
00001 #ifndef __CTGAImage__
00002 #define __CTGAImage__
00003 
00004 #include "CBaseImage.hpp"
00005 using Exponent::GUI::Graphics::CBaseImage;
00006 
00007 //  ===========================================================================
00008 
00009 namespace Exponent
00010 {
00011     namespace GUI
00012     {
00013         namespace Graphics
00014         {
00032             class CTGAImage : public CBaseImage
00033             {
00035                 EXPONENT_CLASS_DECLARATION;
00038 //  ===========================================================================
00039 
00040             public:
00041 
00042 //  ===========================================================================
00043                 
00049                 CTGAImage(const CSystemString &filename);
00050 
00054                 CTGAImage();
00055 
00059                 virtual ~CTGAImage();
00060 
00061 //  ===========================================================================
00062 
00067                 virtual EImageFormats getImageFormat() const { return e_targa; }
00068 
00074                 virtual bool loadFromFile(const CSystemString &filename);
00075 
00076 //  ===========================================================================
00077 
00084                 static CTGAImage *getNewInstance(const CSystemString &path, const CString &filename);
00085 
00086 //  ===========================================================================
00087 
00088             protected:
00089 
00090 //  ===========================================================================
00091 
00097                 struct STGAHeader
00098                 {
00099                     unsigned char m_idLength;           
00100                     unsigned char m_colourMapType;      
00101                     unsigned char m_imageType;          
00102                     unsigned short m_cMapStart;         
00103                     unsigned short m_cMapLength;        
00104                     unsigned char m_cMapDepth;          
00105                     unsigned short m_xOffset;           
00106                     unsigned short m_yOffset;           
00107                     unsigned short m_width;             
00108                     unsigned short m_height;            
00109                     unsigned char m_pixelDepth;         
00110                     unsigned char m_imageDescriptor;    
00111                 };
00112             };
00113         }
00114     }
00115 }
00116 #endif  // End of CTGAImage.hpp

Infinity API - CTGAImage.hpp Source File generated on 7 Mar 2007