xref: /petsc/include/petscdraw.h (revision b16a3bb15a65da75afb90758415d4d6dfcaf0620)
1 /* $Id: draw.h,v 1.16 1995/08/21 18:14:36 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 typedef struct _DrawAxisCtx* DrawAxisCtx;
54 #define AXIS_COOKIE PETSC_COOKIE+16
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 typedef struct _DrawLGCtx*   DrawLGCtx;
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 extern int DrawLGIndicateDataPoints(DrawLGCtx);
73 extern int DrawLGSetLimits(DrawLGCtx,double,double,double,double);
74 
75 #if defined(__VEC_PACKAGE)
76 int DrawTensorContour(DrawCtx,int,int,double*,double*,Vec);
77 #endif
78 
79 #endif
80