
#ifndef ANT_DRAWUTILS_H
#define ANT_DRAWUTILS_H

#ifdef ANT_DRAWUTILS_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif

#define pi 3.14159265

void rotate_x(double angleDeg, int *x, int *y);
void rotate_y(double angleDeg, int *x, int *y);
void rotate_z(double angleDeg, int *x, int *y);
void rotate_z_pts(double angleDeg, XPoint points[], int numofpts);
void offset_pts(int xoffset, int yoffset, XPoint points[], int numofpts);
void scale_pts(double xscale, double yscale, XPoint points[], int numofpts);
void fixRoundOff(double *angle, double inc_angle);
double getAngleInDeg(int x, int y, int xcenter, int ycenter);
void drawLineOffset(Display *disp, Window win, GC gc, int offset,
    int x1, int y1, int x2, int y2);

void createPointer(XPoint points[], int *numofpts);
void createSelector(XPoint points[], int *numofpts);
void createHeadPointer(XPoint points[], int *numofpts);
void createAzDial(void);
void createElDial(void);

Pixmap LoadPixmap(Display *display, char *path, XpmAttributes *attrs);
void   DrawPixmap(Display *display, Window window, Pixmap pixmap,
                unsigned long foreground, int x, int y);

void drawShape(Window win,  struct ShapeDef shapeDef,
       int xCenter, int yCenter);
void drawSun(Window win, int sunRadius, double angle, 
      int radiusCenterOffset, int xCenter, int yCenter);
void updatePosDraw(struct DrawDef drawDef);

int checkMouseWithinSelector(struct DrawDef drawDef, int x, int y);

#undef EXTERN
#endif

