/***************************************************************************** Include file for CS480 ****************************************************************************** Author: Stan Sclaroff Boston University Computer Science Dept. January 27, 1995 ****************************************************************************** Modifications: ******************************************************************************/ typedef struct { Colorindex *pixels; long w,h; long winid; } Pixmap; void draw_point(),set_pixmap(),post_pixmap(),free_pixmap(),close_window(); Pixmap *create_pixmap(); Device get_event(); long open_window(); #define Sign(A) ((A > 0.0) ? 1 : ((A < 0.0) ? -1 : 0)) #define PI 3.14159265358979323846 /* This macro writes a pixel to a pixmap */ #define write_pixel(pixmap,x,y,color) pixmap->pixels[x+y*pixmap->w] = color /* This macro reads a pixel's color from a pixmap */ #define read_pixel(pixmap,x,y) (pixmap->pixels[x+y*pixmap->w])