00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef GCN_IMAGE_HPP
00056 #define GCN_IMAGE_HPP
00057
00058 #include <string>
00059
00060 #include "guichan/imageloader.h"
00061 #include "guichan/platform.h"
00062
00063 namespace gcn
00064 {
00076 class GCN_CORE_DECLSPEC Image
00077 {
00078 public:
00079
00087 Image(void* data, int width, int height);
00088
00095 Image(const std::string& filename);
00096
00101 virtual ~Image();
00102
00108 virtual int getWidth() const;
00109
00115 virtual int getHeight() const;
00116
00125 virtual void* _getData() const;
00126
00133 static ImageLoader* _getImageLoader();
00134
00144 static void setImageLoader(ImageLoader* imageLoader);
00145
00146 protected:
00151 Image();
00152 void* mData;
00153 int mWidth;
00154 int mHeight;
00155 bool mLoadedWithImageLoader;
00156 static ImageLoader* mImageLoader;
00157 };
00158 }
00159
00160 #endif // end GCN_IMAGE_HPP