00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_IGRAPHIC_IMAGE_H__
00020 #define __CS_IGRAPHIC_IMAGE_H__
00021
00031 #include "csutil/scf.h"
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00043 #define CS_IMGFMT_MASK 0x0000ffff
00044
00045 #define CS_IMGFMT_NONE 0x00000000
00046
00047 #define CS_IMGFMT_TRUECOLOR 0x00000001
00048
00049 #define CS_IMGFMT_PALETTED8 0x00000002
00050
00051 #define CS_IMGFMT_ANY CS_IMGFMT_MASK
00052
00053 #define CS_IMGFMT_ALPHA 0x00010000
00054
00058 #define CS_IMGFMT_INVALID 0x80000000
00059
00060
00061 struct csRGBpixel;
00062
00063 SCF_VERSION (iImage, 1, 0, 3);
00064
00071 struct iImage : public iBase
00072 {
00080 virtual void *GetImageData () = 0;
00082 virtual int GetWidth () = 0;
00084 virtual int GetHeight () = 0;
00086 virtual int GetSize () = 0;
00087
00089 virtual void Rescale (int NewWidth, int NewHeight) = 0;
00090
00101 virtual csPtr<iImage> MipMap (int step, csRGBpixel *transp) = 0;
00102
00104 virtual void SetName (const char *iName) = 0;
00106 virtual const char *GetName () = 0;
00107
00109 virtual int GetFormat () = 0;
00111 virtual csRGBpixel *GetPalette () = 0;
00118 virtual uint8 *GetAlpha () = 0;
00128 virtual void SetFormat (int iFormat) = 0;
00129
00131 virtual csPtr<iImage> Clone () = 0;
00132
00134 virtual csPtr<iImage> Crop (int x, int y, int width, int height) = 0;
00135
00137 virtual void CheckAlpha () = 0;
00138
00140 virtual bool HasKeycolor () = 0;
00141
00143 virtual void GetKeycolor (int &r, int &g, int &b) = 0;
00144
00151 virtual csPtr<iImage> Sharpen (csRGBpixel *transp, int strength) = 0;
00152
00156 virtual int HasMipmaps () = 0;
00157 };
00158
00161 #endif // __CS_IGRAPHIC_IMAGE_H__