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 DrawSetDoubleBuffer(DrawCtx); 42 int DrawFlush(DrawCtx); 43 int DrawSyncFlush(DrawCtx); 44 int DrawClear(DrawCtx); 45 46 /* routines related to drawing Axis and line graphs */ 47 48 typedef struct _DrawAxisCtx* DrawAxisCtx; 49 typedef struct _DrawLGCtx* DrawLGCtx; 50 51 int DrawAxisCreate(DrawCtx,DrawAxisCtx *); 52 int DrawAxisDestroy(DrawAxisCtx); 53 int DrawAxis(DrawAxisCtx); 54 int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double); 55 int DrawAxisSetColors(DrawAxisCtx,int,int,int); 56 int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*); 57 58 #define LG_COOKIE 0x17181920 59 int DrawLGCreate(DrawCtx,int,DrawLGCtx *); 60 int DrawLGDestroy(DrawLGCtx); 61 int DrawLGAddPoint(DrawLGCtx,double*,double*); 62 int DrawLGAddPoints(DrawLGCtx,int,double**,double**); 63 int DrawLG(DrawLGCtx); 64 int DrawLGReset(DrawLGCtx); 65 int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *); 66 int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *); 67 68 #endif 69