Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

tga.h

00001 //----------------------------------------------------------------------------// 00002 // viewer.h // 00003 // Copyright (C) 2003 Desmecht Laurent // 00004 //----------------------------------------------------------------------------// 00005 // This program is free software; you can redistribute it and/or modify it // 00006 // under the terms of the GNU General Public License as published by the Free // 00007 // Software Foundation; either version 2 of the License, or (at your option) // 00008 // any later version. // 00009 //----------------------------------------------------------------------------// 00010 00011 #ifndef _TGA_H 00012 #define _TGA_H 00013 00014 #include <stdio.h> 00015 #include <stdlib.h> 00016 00034 class CTgaHeader 00035 { 00036 public: 00037 char idlength; 00038 char colourmaptype; 00039 char datatypecode; 00040 short colourmaporigin; 00041 short colourmaplength; 00042 char colourmapdepth; 00043 short x_origin; 00044 short y_origin; 00045 short SizeX; 00046 short SizeY; 00047 char Bpp; 00048 char imagedescriptor; 00049 }; 00050 00051 class CTga 00052 { 00053 private: 00054 CTgaHeader TgaHeader; 00055 int m_SizeX,m_SizeY,m_Bpp; 00056 unsigned char *m_dest; 00057 public: 00058 00059 CTga(); 00060 00061 int GetSizeX() 00062 { 00063 return m_SizeX; 00064 } 00065 00066 int GetSizeY() 00067 { 00068 return m_SizeY; 00069 } 00070 00071 int Bpp() 00072 { 00073 return m_Bpp; 00074 } 00075 00076 unsigned char * GetPointer() 00077 { 00078 return m_dest; 00079 } 00080 00081 int ReadFile(const char *str); 00082 int Release(); 00083 }; 00084 00085 #endif

Generated on Sun Aug 15 19:19:23 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8