1 /* $Id: draw.h,v 1.17 1995/08/22 16:33:42 bsmith Exp bsmith $ */ 2 /* 3 Public include file for all of the PETSc graphics routines 4 */ 5 #if !defined(__DRAW_PACKAGE) 6 #define __DRAW_PACKAGE 7 #include "petsc.h" 8 9 #define DRAW_COOKIE PETSC_COOKIE+6 10 11 /* types of draw contexts */ 12 #define XWINDOW 0 13 #define NULLWINDOW 1 14 15 typedef struct _DrawCtx* DrawCtx; 16 17 #define DRAW_WHITE 0 18 #define DRAW_BLACK 1 19 #define DRAW_RED 2 20 #define DRAW_YELLOW 3 21 #define DRAW_GREEN 4 22 #define DRAW_CYAN 5 23 #define DRAW_BLUE 6 24 25 extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,DrawCtx*); 26 extern int DrawOpenNull(MPI_Comm,DrawCtx *); 27 extern int DrawDestroy(DrawCtx); 28 29 extern int DrawLine(DrawCtx,double,double,double,double,int); 30 extern int DrawLineSetWidth(DrawCtx,double); 31 32 extern int DrawPoint(DrawCtx,double,double,int); 33 extern int DrawPointSetSize(DrawCtx,double); 34 35 extern int DrawRectangle(DrawCtx,double,double,double,double,int,int,int,int); 36 extern int DrawTriangle(DrawCtx,double,double,double,double,double,double,int,int,int); 37 38 extern int DrawText(DrawCtx,double,double,int,char*); 39 extern int DrawTextVertical(DrawCtx,double,double,int,char*); 40 extern int DrawTextSetSize(DrawCtx,double,double); 41 extern int DrawTextGetSize(DrawCtx,double*,double*); 42 43 extern int DrawSetViewPort(DrawCtx,double,double,double,double); 44 extern int DrawSetCoordinates(DrawCtx,double,double,double,double); 45 extern int DrawGetCoordinates(DrawCtx,double*,double*,double*,double*); 46 47 extern int DrawSetPause(DrawCtx,int); 48 extern int DrawSetDoubleBuffer(DrawCtx); 49 extern int DrawFlush(DrawCtx); 50 extern int DrawSyncFlush(DrawCtx); 51 extern int DrawClear(DrawCtx); 52 extern int DrawPause(DrawCtx); 53 extern int DrawGetPause(DrawCtx,int*); 54 55 typedef enum {BUTTON_NONE, BUTTON_LEFT, BUTTON_CENTER, BUTTON_RIGHT } DrawButton; 56 extern int DrawGetMouseButton(DrawCtx,DrawButton *,double*,double *,double *,double *); 57 58 typedef struct _DrawAxisCtx* DrawAxisCtx; 59 #define AXIS_COOKIE PETSC_COOKIE+16 60 extern int DrawAxisCreate(DrawCtx,DrawAxisCtx *); 61 extern int DrawAxisDestroy(DrawAxisCtx); 62 extern int DrawAxis(DrawAxisCtx); 63 extern int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double); 64 extern int DrawAxisSetColors(DrawAxisCtx,int,int,int); 65 extern int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*); 66 67 typedef struct _DrawLGCtx* DrawLGCtx; 68 #define LG_COOKIE PETSC_COOKIE+7 69 extern int DrawLGCreate(DrawCtx,int,DrawLGCtx *); 70 extern int DrawLGDestroy(DrawLGCtx); 71 extern int DrawLGAddPoint(DrawLGCtx,double*,double*); 72 extern int DrawLGAddPoints(DrawLGCtx,int,double**,double**); 73 extern int DrawLG(DrawLGCtx); 74 extern int DrawLGReset(DrawLGCtx); 75 extern int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *); 76 extern int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *); 77 extern int DrawLGIndicateDataPoints(DrawLGCtx); 78 extern int DrawLGSetLimits(DrawLGCtx,double,double,double,double); 79 80 #if defined(__VEC_PACKAGE) 81 int DrawTensorContour(DrawCtx,int,int,double*,double*,Vec); 82 #endif 83 84 #endif 85