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