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