ImageFormat.h
Go to the documentation of this file.00001 00011 #ifndef __ImageFormat_H__ 00012 #define __ImageFormat_H__ 00013 00014 // Includes 00015 #include "Array.h" 00016 00017 // Forward declares 00018 class Asset; 00019 class Filename; 00020 00021 // ImageFormat 00022 class ImageFormat 00023 { 00024 public: 00028 virtual ~ImageFormat() { } 00029 00030 virtual int GetWidth() = 0; 00031 00032 virtual int GetHeight() = 0; 00033 00034 virtual int GetCelCount() = 0; 00035 00036 virtual float GetCelDelay(int celIndex) = 0; 00037 00038 virtual void CopyPixels(unsigned int* destination) = 0; 00039 00040 static ImageFormat* CreateImageFormat(const Asset& asset); 00041 00042 protected: 00043 static void RegisterImageFormat(bool (*TestFunction)(const Asset&),ImageFormat* (*CreateFunction)(const Asset&)); 00044 00045 private: 00046 struct ImageFormatEntry 00047 { 00048 bool (*TestFunction)(const Asset&); 00049 ImageFormat* (*CreateFunction)(const Asset&); 00050 }; 00051 static Array<ImageFormatEntry> imageFormats_; 00052 00053 }; 00054 00055 #endif /* __ImageFormat_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
