00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef INCL_IWIN8
00027 #define INCL_IWIN8 1
00028
00029 #include "imagewin.h"
00030 #include "ibuf8.h"
00031
00032 template <class T> class GammaTable;
00033
00034
00035
00036
00037
00038 class Image_window8 : public Image_window
00039 {
00040 unsigned char colors[768];
00041 Image_buffer8 *ib8;
00042
00043 static GammaTable<unsigned char> GammaRed;
00044 static GammaTable<unsigned char> GammaGreen;
00045 static GammaTable<unsigned char> GammaBlue;
00046 public:
00047 Image_window8(unsigned int w, unsigned int h, int scl = 1,
00048 bool fs = false, int sclr = point);
00049 ~Image_window8();
00050
00051 Image_buffer8 *get_ib8() const
00052 { return ib8; }
00053
00054 virtual void set_palette(unsigned char *rgbs, int maxval,
00055 int brightness = 100);
00056
00057 virtual void rotate_colors(int first, int num, int upd);
00058
00059
00060
00061
00062 void fill8(unsigned char val)
00063 { ib8->Image_buffer8::fill8(val); }
00064
00065 void fill8(unsigned char val, int srcw, int srch,
00066 int destx, int desty)
00067 { IF_OPENGL(opengl_fill8(val, srcw, srch, destx, desty),
00068 ib8->Image_buffer8::fill8(val, srcw, srch, destx, desty)); }
00069
00070 void fill_line8(unsigned char val, int srcw,
00071 int destx, int desty)
00072 { ib8->Image_buffer8::fill_line8(val, srcw, destx, desty); }
00073
00074 void copy8(unsigned char *src_pixels,
00075 int srcw, int srch, int destx, int desty)
00076 { ib8->Image_buffer8::copy8(src_pixels, srcw, srch,
00077 destx, desty); }
00078
00079 void copy_line8(unsigned char *src_pixels, int srcw,
00080 int destx, int desty)
00081 { ib8->Image_buffer8::copy_line8(src_pixels, srcw,
00082 destx, desty); }
00083
00084 void copy_line_translucent8(
00085 unsigned char *src_pixels, int srcw,
00086 int destx, int desty, int first_translucent,
00087 int last_translucent, Xform_palette *xforms)
00088 { ib8->Image_buffer8::copy_line_translucent8(src_pixels, srcw,
00089 destx, desty,
00090 first_translucent, last_translucent, xforms); }
00091
00092 void fill_line_translucent8(unsigned char val,
00093 int srcw, int destx, int desty, Xform_palette& xform)
00094 { ib8->Image_buffer8::fill_line_translucent8(val,
00095 srcw, destx, desty, xform); }
00096
00097 void copy_transparent8(unsigned char *src_pixels, int srcw,
00098 int srch, int destx, int desty)
00099 { ib8->Image_buffer8::copy_transparent8(src_pixels, srcw, srch,
00100 destx, desty); }
00101
00102 unsigned char get_pixel8(int x, int y)
00103 { return ib8->Image_buffer8::get_pixel8(x, y); }
00104 void put_pixel8(unsigned char pix, int x, int y)
00105 { ib8->Image_buffer8::put_pixel8(pix, x, y); }
00106
00107 static void get_gamma (float &r, float &g, float &b);
00108 static void set_gamma (float r, float g, float b);
00109
00110 unsigned char* mini_screenshot();
00111 };
00112
00113 #endif