Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
imagevolumemaker.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2005 by Jorrit Tyberghein 00003 (C) 2005 by Frank Richter 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00027 #ifndef __CS_CSGFX_IMAGEVOLUMEMAKER_H__ 00028 #define __CS_CSGFX_IMAGEVOLUMEMAKER_H__ 00029 00030 #include "csextern.h" 00031 #include "csutil/leakguard.h" 00032 #include "csutil/refarr.h" 00033 #include "imagebase.h" 00034 00039 class CS_CSGFX_EXPORT csImageVolumeMaker : public csImageBase 00040 { 00041 protected: 00042 bool manualName; 00043 csRefArray<iImage> pendingImages; 00044 int Width; 00045 int Height; 00046 int Depth; 00047 int Format; 00048 00049 void* data; 00050 csRGBpixel* palette; 00051 uint8* alpha; 00052 00053 void AppendPending (); 00054 public: 00055 SCF_DECLARE_IBASE; 00056 CS_LEAKGUARD_DECLARE (csImageVolumeMaker); 00057 00063 csImageVolumeMaker (int format = -1, int width = -1, int height = -1); 00067 csImageVolumeMaker (iImage* source); 00068 virtual ~csImageVolumeMaker(); 00069 00070 virtual const void *GetImageData (); 00071 virtual int GetWidth () const { return Width > 0 ? Width : 0; } 00072 virtual int GetHeight () const { return Height > 0 ? Height : 0; ; } 00073 virtual int GetDepth () const { return Depth + pendingImages.Length(); } 00075 virtual void SetName (const char *iName); 00082 virtual const char *GetName () const { return fName; } 00083 00084 virtual int GetFormat () const; 00085 virtual const csRGBpixel* GetPalette (); 00086 virtual const uint8* GetAlpha (); 00087 00088 virtual const char* GetRawFormat() const { return 0; } 00089 virtual csRef<iDataBuffer> GetRawData() const { return 0; } 00090 virtual csImageType GetImageType() const { return csimg3D; } 00091 00092 void AddImage (iImage* source); 00093 }; 00094 00097 #endif // __CS_CSGFX_IMAGEVOLUMEMAKER_H__
Generated for Crystal Space by doxygen 1.3.9.1