00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __IGRAPHIC_IMAGE_H__
00020 #define __IGRAPHIC_IMAGE_H__
00021
00022 #include "csutil/scf.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00034 #define CS_IMGFMT_MASK 0x0000ffff
00035
00036 #define CS_IMGFMT_NONE 0x00000000
00037
00038 #define CS_IMGFMT_TRUECOLOR 0x00000001
00039
00040 #define CS_IMGFMT_PALETTED8 0x00000002
00041
00042 #define CS_IMGFMT_ANY CS_IMGFMT_MASK
00043
00044 #define CS_IMGFMT_ALPHA 0x00010000
00045
00049 #define CS_IMGFMT_INVALID 0x80000000
00050
00051
00052 struct csRGBpixel;
00053
00054 SCF_VERSION (iImage, 1, 0, 1);
00055
00062 struct iImage : public iBase
00063 {
00071 virtual void *GetImageData () = 0;
00073 virtual int GetWidth () = 0;
00075 virtual int GetHeight () = 0;
00077 virtual int GetSize () = 0;
00078
00080 virtual void Rescale (int NewWidth, int NewHeight) = 0;
00081
00091 virtual iImage *MipMap (int step, csRGBpixel *transp) = 0;
00092
00094 virtual void SetName (const char *iName) = 0;
00096 virtual const char *GetName () = 0;
00097
00099 virtual int GetFormat () = 0;
00101 virtual csRGBpixel *GetPalette () = 0;
00108 virtual UByte *GetAlpha () = 0;
00118 virtual void SetFormat (int iFormat) = 0;
00119
00121 virtual iImage *Clone () = 0;
00122
00124 virtual iImage *Crop (int x, int y, int width, int height) = 0;
00125
00127 virtual void CheckAlpha () = 0;
00128
00130 virtual bool HasKeycolor () = 0;
00131
00133 virtual void GetKeycolor (int &r, int &g, int &b) = 0;
00134 };
00135
00136 #endif // __IGRAPHIC_IMAGE_H__