Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | 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_CRYSTALSPACE_EXPORT csImageVolumeMaker : public csImageBase 00040 { 00041 protected: 00046 bool manualName; 00051 csRefArray<iImage> pendingImages; 00053 int Width; 00055 int Height; 00057 int Depth; 00059 int Format; 00060 00062 void* data; 00064 csRGBpixel* palette; 00066 uint8* alpha; 00067 00069 void AppendPending (); 00070 public: 00071 SCF_DECLARE_IBASE; 00072 CS_LEAKGUARD_DECLARE (csImageVolumeMaker); 00073 00079 csImageVolumeMaker (int format = -1, int width = -1, int height = -1); 00083 csImageVolumeMaker (iImage* source); 00084 virtual ~csImageVolumeMaker(); 00085 00086 virtual const void *GetImageData (); 00087 virtual int GetWidth () const { return Width > 0 ? Width : 0; } 00088 virtual int GetHeight () const { return Height > 0 ? Height : 0; ; } 00089 virtual int GetDepth () const { return Depth + (int)pendingImages.Length(); } 00091 virtual void SetName (const char *iName); 00098 virtual const char *GetName () const { return fName; } 00099 00100 virtual int GetFormat () const; 00101 virtual const csRGBpixel* GetPalette (); 00102 virtual const uint8* GetAlpha (); 00103 00104 virtual const char* GetRawFormat() const { return 0; } 00105 virtual csRef<iDataBuffer> GetRawData() const { return 0; } 00106 virtual csImageType GetImageType() const { return csimg3D; } 00107 00108 void AddImage (iImage* source); 00109 }; 00110 00113 #endif // __CS_CSGFX_IMAGEVOLUMEMAKER_H__
Generated for Crystal Space by doxygen 1.4.4