xref: /petsc/include/petscdraw.h (revision c01c455d43b147fbcccdf73d28be4d01ad7032e0)
1 /* $Id: draw.h,v 1.15 1995/07/27 02:18:38 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 
53 /* routines related to drawing Axis and line graphs */
54 
55 typedef struct _DrawAxisCtx* DrawAxisCtx;
56 typedef struct _DrawLGCtx*   DrawLGCtx;
57 
58 extern int DrawAxisCreate(DrawCtx,DrawAxisCtx *);
59 extern int DrawAxisDestroy(DrawAxisCtx);
60 extern int DrawAxis(DrawAxisCtx);
61 extern int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double);
62 extern int DrawAxisSetColors(DrawAxisCtx,int,int,int);
63 extern int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*);
64 
65 #define LG_COOKIE PETSC_COOKIE+7
66 extern int DrawLGCreate(DrawCtx,int,DrawLGCtx *);
67 extern int DrawLGDestroy(DrawLGCtx);
68 extern int DrawLGAddPoint(DrawLGCtx,double*,double*);
69 extern int DrawLGAddPoints(DrawLGCtx,int,double**,double**);
70 extern int DrawLG(DrawLGCtx);
71 extern int DrawLGReset(DrawLGCtx);
72 extern int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *);
73 extern int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *);
74 extern int DrawLGIndicateDataPoints(DrawLGCtx);
75 extern int DrawLGSetLimits(DrawLGCtx,double,double,double,double);
76 
77 #if defined(__VEC_PACKAGE)
78 int DrawTensorContour(DrawCtx,int,int,double*,double*,Vec);
79 #endif
80 
81 #endif
82