xref: /petsc/include/petscdraw.h (revision 3b1aa7bf6db2ad751eca3a9bce3a57f8115f8d34)
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 DrawOpenNull(MPI_Comm,DrawCtx *);
26 extern int DrawDestroy(DrawCtx);
27 
28 extern int DrawLine(DrawCtx,double,double,double,double,int,int);
29 extern int DrawLineSetWidth(DrawCtx,double);
30 
31 extern int DrawPoint(DrawCtx,double,double,int);
32 extern int DrawPointSetSize(DrawCtx,double);
33 
34 extern int DrawRectangle(DrawCtx,double,double,double,double,int,int,int,int);
35 extern int DrawTriangle(DrawCtx,double,double,double,double,double,double,int,int,int);
36 
37 extern int DrawText(DrawCtx,double,double,int,char*);
38 extern int DrawTextVertical(DrawCtx,double,double,int,char*);
39 extern int DrawTextSetSize(DrawCtx,double,double);
40 extern int DrawTextGetSize(DrawCtx,double*,double*);
41 
42 extern int DrawSetViewPort(DrawCtx,double,double,double,double);
43 extern int DrawSetCoordinates(DrawCtx,double,double,double,double);
44 extern int DrawGetCoordinates(DrawCtx,double*,double*,double*,double*);
45 
46 extern int DrawSetPause(DrawCtx,int);
47 extern int DrawSetDoubleBuffer(DrawCtx);
48 extern int DrawFlush(DrawCtx);
49 extern int DrawSyncFlush(DrawCtx);
50 extern int DrawClear(DrawCtx);
51 
52 /* routines related to drawing Axis and line graphs */
53 
54 typedef struct _DrawAxisCtx* DrawAxisCtx;
55 typedef struct _DrawLGCtx*   DrawLGCtx;
56 
57 extern int DrawAxisCreate(DrawCtx,DrawAxisCtx *);
58 extern int DrawAxisDestroy(DrawAxisCtx);
59 extern int DrawAxis(DrawAxisCtx);
60 extern int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double);
61 extern int DrawAxisSetColors(DrawAxisCtx,int,int,int);
62 extern int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*);
63 
64 #define LG_COOKIE PETSC_COOKIE+7
65 extern int DrawLGCreate(DrawCtx,int,DrawLGCtx *);
66 extern int DrawLGDestroy(DrawLGCtx);
67 extern int DrawLGAddPoint(DrawLGCtx,double*,double*);
68 extern int DrawLGAddPoints(DrawLGCtx,int,double**,double**);
69 extern int DrawLG(DrawLGCtx);
70 extern int DrawLGReset(DrawLGCtx);
71 extern int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *);
72 extern int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *);
73 
74 #if defined(__VEC_PACKAGE)
75 int DrawTensorContour(DrawCtx,int,int,double*,double*,Vec);
76 #endif
77 
78 #endif
79