#ifndef CANVASH #define CANVASH #include #include #include "geo.h" typedef struct GLCanvas { int x; /* x-coord of placement */ int y; /* y-coord of placement */ int width; /* width of drawing area */ int height; /* height of drawing are */ unsigned long *pixels; /* pointer to 32 bit pixel buffer */ float sizemultiplier; /* appliocation specific */ unsigned char *buffer; /* stores image in jpeg rgb format */ int lastcompression; /* the last value we compressed at */ int lastsmoothing; IntRect validgeometry; /* See comment below */ } GLCanvas; /* A note on the pixel buffer: */ /* "Pixel data to be interpreted as red-green-blue-alpha packs */ /* 8 bits for each into a 32-bit word. Bits 0-7 represent red, */ /* bits 8-15 represent green, bits 16-32 represent blue, and */ /* bits 24-31 represent alpha. For example, 0x01020304 */ /* corresponds to a pixel whose red, green, blue, and alpha */ /* values are 4, 3, 2, and 1, repectively." */ /* - IRIS 4D Series Graphics Library Programming Guide */ void drawCanvas(GLCanvas *canvas) ; void invertcanvas(struct GLCanvas *canvas) ; void saveGLStackStates(void); void restoreGLStackStates(void); #endif