#ifndef _GLOBALS_H_ #define _GLOBALS_H_ #include typedef double Matrix3[3][3]; /* generic matrix type for transforms */ /* generic point type for transformations */ typedef struct { short x; short y; short e; } HPoint; /* our widgets */ Widget toplevel, form, trans_xplus, trans_xminus, trans_yplus, trans_yminus, rotate_cw, rotate_ccw, scale_up, scale_down, quit, colour, canvas, filename, load; /* our transformation matricies */ Matrix3 ScaleUpMatrix, ScaleDownMatrix, TransXPlusMatrix, TransXMinusMatrix, TransYPlusMatrix, TransYMinusMatrix, RotateCWMatrix, RotateCCWMatrix; Display *display; /* our X display, used often throughout program */ int red, green, blue; /* colour pixel numbers */ Matrix3 Transform; /* our global transformation matrix */ XPoint polypoint[100]; /* array to hold our polygon data */ int polysize; /* number of points in our polygon */ int poly_colour; /* current colour of our polygon */ /* and finally our pixmaps for the graphical buttons. */ Pixmap leftarrow, rightarrow, uparrow, downarrow, rotatecw, rotateccw, scaleup, scaledown, ecks; #endif