1 /* 2 Public include file for all of the PETSc graphics routines 3 */ 4 #if !defined(__DRAW_PACKAGE) 5 #define __DRAW_PACKAGE 6 7 typedef struct _DrawCtx* DrawCtx; 8 9 #define DRAW_WHITE 0 10 #define DRAW_BLACK 1 11 #define DRAW_RED 2 12 #define DRAW_YELLOW 3 13 #define DRAW_GREEN 4 14 #define DRAW_CYAN 5 15 #define DRAW_BLUE 6 16 17 #define DRAW_COOKIE 0x101010 18 int DrawOpenX(char*,char *,int,int,int,int,DrawCtx*); 19 int DrawDestroy(DrawCtx); 20 21 int DrawLine(DrawCtx,double,double,double,double,int,int); 22 int DrawLineSetWidth(DrawCtx,double); 23 24 int DrawPoint(DrawCtx,double,double,int); 25 int DrawPointSetSize(DrawCtx,double); 26 27 int DrawText(DrawCtx,double,double,int,char*); 28 int DrawTextVertical(DrawCtx,double,double,int,char*); 29 int DrawTextSetSize(DrawCtx,double,double); 30 int DrawTextGetSize(DrawCtx,double*,double*); 31 32 int DrawSetViewPort(DrawCtx,double,double,double,double); 33 int DrawSetCoordinates(DrawCtx,double,double,double,double); 34 int DrawSetDoubleBuffer(DrawCtx); 35 int DrawFlush(DrawCtx); 36 int DrawClear(DrawCtx); 37 38 /* routines related to drawing Axis and line graphs */ 39 40 typedef struct _DrawAxisCtx* DrawAxisCtx; 41 typedef struct _DrawLGCtx* DrawLGCtx; 42 43 int DrawAxisCreate(DrawCtx,DrawAxisCtx *); 44 int DrawAxisDestroy(DrawAxisCtx); 45 int DrawAxis(DrawAxisCtx); 46 int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double); 47 int DrawAxisSetColors(DrawAxisCtx,int,int,int); 48 int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*); 49 50 #define LG_COOKIE 0x17181920 51 int DrawLGCreate(DrawCtx,int,DrawLGCtx *); 52 int DrawLGDestroy(DrawLGCtx); 53 int DrawLGAddPoint(DrawLGCtx,double*,double*); 54 int DrawLGAddPoints(DrawLGCtx,int,double**,double**); 55 int DrawLG(DrawLGCtx); 56 int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *); 57 int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *); 58 59 #endif 60