/*
   NAME:     macros
   AUTHOR:   Ole Gunnar Westgaard
   DATE:     Jul 14 1995
             
*/
#ifndef MACROS
#define MACROS

//=============================================================================
// Funny little defines concerning doing simple graphics functions
//=============================================================================
#define SetColor(c) XSetForeground(o_dpy,o_gc,c)
#define Box(a,b,c,d) XDrawRectangle(o_dpy,o_win,o_gc,a,b,(c)-(a),(d)-(b))
#define Fbox(a,b,c,d) XFillRectangle(o_dpy,o_win,o_gc,a,b,(c)-(a)+1,(d)-(b)+1)
#define Line(a,b,c,d) XDrawLine(o_dpy,o_win,o_gc,a,b,c,d)
#define Clear(a,b,c,d) XClearArea(o_dpy,o_win,a,b,(c)-(a),(d)-(b),False)
#define FillPoly(p,n,s,m) XFillPolygon(o_dpy,o_win,o_gc,p,n,s,m)
#define Lines(p,n,m) XDrawLines(o_dpy,o_win,o_gc,p,n,m)
#define DrawString(x,y,msg) XDrawString(o_dpy,o_win,o_gc,x,y,msg,strlen(msg))

#define oColor(c) XSetForeground(o_dpy,o_gc,color->c)

#endif /* MACROS */
