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 PETSC_COOKIE+6 9 10 /* types of draw contexts */ 11 #define XWINDOW 0 12 #define NULLWINDOW 1 13 14 typedef struct _DrawCtx* DrawCtx; 15 16 #define DRAW_WHITE 0 17 #define DRAW_BLACK 1 18 #define DRAW_RED 2 19 #define DRAW_YELLOW 3 20 #define DRAW_GREEN 4 21 #define DRAW_CYAN 5 22 #define DRAW_BLUE 6 23 24 extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,DrawCtx*); 25 extern int DrawDestroy(DrawCtx); 26 27 extern int DrawLine(DrawCtx,double,double,double,double,int,int); 28 extern int DrawLineSetWidth(DrawCtx,double); 29 30 extern int DrawPoint(DrawCtx,double,double,int); 31 extern int DrawPointSetSize(DrawCtx,double); 32 33 extern int DrawRectangle(DrawCtx,double,double,double,double,int,int,int,int); 34 extern int DrawTriangle(DrawCtx,double,double,double,double,double,double,int,int,int); 35 36 extern int DrawText(DrawCtx,double,double,int,char*); 37 extern int DrawTextVertical(DrawCtx,double,double,int,char*); 38 extern int DrawTextSetSize(DrawCtx,double,double); 39 extern int DrawTextGetSize(DrawCtx,double*,double*); 40 41 extern int DrawSetViewPort(DrawCtx,double,double,double,double); 42 extern int DrawSetCoordinates(DrawCtx,double,double,double,double); 43 extern int DrawGetCoordinates(DrawCtx,double*,double*,double*,double*); 44 45 extern int DrawSetPause(DrawCtx,int); 46 extern int DrawSetDoubleBuffer(DrawCtx); 47 extern int DrawFlush(DrawCtx); 48 extern int DrawSyncFlush(DrawCtx); 49 extern int DrawClear(DrawCtx); 50 51 /* routines related to drawing Axis and line graphs */ 52 53 typedef struct _DrawAxisCtx* DrawAxisCtx; 54 typedef struct _DrawLGCtx* DrawLGCtx; 55 56 extern int DrawAxisCreate(DrawCtx,DrawAxisCtx *); 57 extern int DrawAxisDestroy(DrawAxisCtx); 58 extern int DrawAxis(DrawAxisCtx); 59 extern int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double); 60 extern int DrawAxisSetColors(DrawAxisCtx,int,int,int); 61 extern int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*); 62 63 #define LG_COOKIE PETSC_COOKIE+7 64 extern int DrawLGCreate(DrawCtx,int,DrawLGCtx *); 65 extern int DrawLGDestroy(DrawLGCtx); 66 extern int DrawLGAddPoint(DrawLGCtx,double*,double*); 67 extern int DrawLGAddPoints(DrawLGCtx,int,double**,double**); 68 extern int DrawLG(DrawLGCtx); 69 extern int DrawLGReset(DrawLGCtx); 70 extern int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *); 71 extern int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *); 72 73 #if defined(__VEC_PACKAGE) 74 int DrawTensorContour(DrawCtx,int,int,double*,double*,Vec); 75 #endif 76 77 #endif 78