xref: /petsc/include/petscdraw.h (revision d4fbbf0ea49bb599f06790484d06b33562a2b638)
1*d4fbbf0eSBarry Smith /* $Id: draw.h,v 1.32 1996/07/10 01:52:20 bsmith Exp bsmith $ */
243e6b640SBarry Smith /*
343e6b640SBarry Smith   Public include file for all of the PETSc graphics routines
443e6b640SBarry Smith */
51eb62cbbSBarry Smith #if !defined(__DRAW_PACKAGE)
61eb62cbbSBarry Smith #define __DRAW_PACKAGE
7d6dfbf8fSBarry Smith #include "petsc.h"
843e6b640SBarry Smith 
99e25ed09SBarry Smith #define DRAW_COOKIE PETSC_COOKIE+6
10f0479e8cSBarry Smith 
11d6dfbf8fSBarry Smith /* types of draw contexts */
126d4a8577SBarry Smith #define DRAW_XWINDOW    0
136d4a8577SBarry Smith #define DRAW_NULLWINDOW 1
146d4a8577SBarry Smith #define DRAW_VRML       2
15d6dfbf8fSBarry Smith 
16d7e8b826SBarry Smith typedef struct _Draw* Draw;
1743e6b640SBarry Smith 
1820563c6bSBarry Smith #define DRAW_WHITE       0
1920563c6bSBarry Smith #define DRAW_BLACK       1
2020563c6bSBarry Smith #define DRAW_RED         2
21f8d5e24aSBarry Smith #define DRAW_GREEN       3
22f8d5e24aSBarry Smith #define DRAW_CYAN        4
23f8d5e24aSBarry Smith #define DRAW_BLUE        5
24f8d5e24aSBarry Smith #define DRAW_MAGENTA     6
25f8d5e24aSBarry Smith #define DRAW_AQUAMARINE  7
26f8d5e24aSBarry Smith #define DRAW_FORESTGREEN 8
27f8d5e24aSBarry Smith #define DRAW_ORANGE      9
28f8d5e24aSBarry Smith #define DRAW_VIOLET      10
29f8d5e24aSBarry Smith #define DRAW_BROWN       11
30f8d5e24aSBarry Smith #define DRAW_PINK        12
31f8d5e24aSBarry Smith #define DRAW_CORAL       13
32f8d5e24aSBarry Smith #define DRAW_GRAY        14
33f8d5e24aSBarry Smith #define DRAW_YELLOW      15
3420563c6bSBarry Smith 
35d7e8b826SBarry Smith extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Draw*);
36e340e5c6SBarry Smith extern int DrawOpenVRML( MPI_Comm, char *, char *, Draw * );
37e340e5c6SBarry Smith 
38d7e8b826SBarry Smith extern int DrawOpenNull(MPI_Comm,Draw *);
39d7e8b826SBarry Smith extern int DrawDestroy(Draw);
4019bcc07fSBarry Smith extern int DrawIsNull(Draw,PetscTruth*);
4143e6b640SBarry Smith 
42*d4fbbf0eSBarry Smith extern int DrawCreatePopUp(Draw,Draw*);
43*d4fbbf0eSBarry Smith extern int DrawCheckResizedWindow(Draw);
44*d4fbbf0eSBarry Smith 
45bcd2baecSBarry Smith extern int ViewerDrawGetDraw(Viewer, Draw*);
46bcd2baecSBarry Smith 
475311e20fSBarry Smith 
48d7e8b826SBarry Smith extern int DrawLine(Draw,double,double,double,double,int);
49d7e8b826SBarry Smith extern int DrawLineSetWidth(Draw,double);
509a28b0a6SLois Curfman McInnes extern int DrawLineGetWidth(Draw,double*);
5143e6b640SBarry Smith 
52d7e8b826SBarry Smith extern int DrawPoint(Draw,double,double,int);
53d7e8b826SBarry Smith extern int DrawPointSetSize(Draw,double);
548ed539a5SBarry Smith 
55d7e8b826SBarry Smith extern int DrawRectangle(Draw,double,double,double,double,int,int,int,int);
56d7e8b826SBarry Smith extern int DrawTriangle(Draw,double,double,double,double,double,double,int,int,int);
578ed539a5SBarry Smith 
58d7e8b826SBarry Smith extern int DrawText(Draw,double,double,int,char*);
59d7e8b826SBarry Smith extern int DrawTextVertical(Draw,double,double,int,char*);
60d7e8b826SBarry Smith extern int DrawTextSetSize(Draw,double,double);
61d7e8b826SBarry Smith extern int DrawTextGetSize(Draw,double*,double*);
62d6dfbf8fSBarry Smith 
63d7e8b826SBarry Smith extern int DrawSetViewPort(Draw,double,double,double,double);
64d7e8b826SBarry Smith extern int DrawSetCoordinates(Draw,double,double,double,double);
65d7e8b826SBarry Smith extern int DrawGetCoordinates(Draw,double*,double*,double*,double*);
669e25ed09SBarry Smith 
67*d4fbbf0eSBarry Smith extern int DrawSetTitle(Draw,char *);
68*d4fbbf0eSBarry Smith extern int DrawAppendTitle(Draw,char *);
69*d4fbbf0eSBarry Smith extern int DrawGetTitle(Draw,char **);
70*d4fbbf0eSBarry Smith 
71d7e8b826SBarry Smith extern int DrawSetPause(Draw,int);
7277c4ece6SBarry Smith extern int DrawGetPause(Draw,int*);
7377c4ece6SBarry Smith extern int DrawPause(Draw);
74d7e8b826SBarry Smith extern int DrawSetDoubleBuffer(Draw);
75d7e8b826SBarry Smith extern int DrawFlush(Draw);
76d7e8b826SBarry Smith extern int DrawSyncFlush(Draw);
77d7e8b826SBarry Smith extern int DrawClear(Draw);
781a20e397SBarry Smith extern int DrawSyncClear(Draw);
79e340e5c6SBarry Smith extern int DrawBOP(Draw);
80e340e5c6SBarry Smith extern int DrawEOP(Draw);
81cddf8d76SBarry Smith 
82cddf8d76SBarry Smith typedef enum {BUTTON_NONE, BUTTON_LEFT, BUTTON_CENTER, BUTTON_RIGHT } DrawButton;
83d7e8b826SBarry Smith extern int DrawGetMouseButton(Draw,DrawButton *,double*,double *,double *,double *);
8420563c6bSBarry Smith 
85d7e8b826SBarry Smith typedef struct _DrawAxis* DrawAxis;
866d4a8577SBarry Smith #define DRAWAXIS_COOKIE PETSC_COOKIE+16
87d7e8b826SBarry Smith extern int DrawAxisCreate(Draw,DrawAxis *);
88d7e8b826SBarry Smith extern int DrawAxisDestroy(DrawAxis);
89d7e8b826SBarry Smith extern int DrawAxisDraw(DrawAxis);
90d7e8b826SBarry Smith extern int DrawAxisSetLimits(DrawAxis,double,double,double,double);
91d7e8b826SBarry Smith extern int DrawAxisSetColors(DrawAxis,int,int,int);
92d7e8b826SBarry Smith extern int DrawAxisSetLabels(DrawAxis,char*,char*,char*);
9320563c6bSBarry Smith 
94d7e8b826SBarry Smith typedef struct _DrawLG*   DrawLG;
956d4a8577SBarry Smith #define DRAWLG_COOKIE PETSC_COOKIE+7
96d7e8b826SBarry Smith extern int DrawLGCreate(Draw,int,DrawLG *);
97d7e8b826SBarry Smith extern int DrawLGDestroy(DrawLG);
98d7e8b826SBarry Smith extern int DrawLGAddPoint(DrawLG,double*,double*);
99d7e8b826SBarry Smith extern int DrawLGAddPoints(DrawLG,int,double**,double**);
100d7e8b826SBarry Smith extern int DrawLGDraw(DrawLG);
101d7e8b826SBarry Smith extern int DrawLGReset(DrawLG);
1025311e20fSBarry Smith extern int DrawLGSetDimension(DrawLG,int);
103d7e8b826SBarry Smith extern int DrawLGGetAxis(DrawLG,DrawAxis *);
104d7e8b826SBarry Smith extern int DrawLGGetDraw(DrawLG,Draw *);
105d7e8b826SBarry Smith extern int DrawLGIndicateDataPoints(DrawLG);
106d7e8b826SBarry Smith extern int DrawLGSetLimits(DrawLG,double,double,double,double);
10743e6b640SBarry Smith 
108*d4fbbf0eSBarry Smith typedef struct _DrawSP*   DrawSP;
109*d4fbbf0eSBarry Smith #define DRAWSP_COOKIE PETSC_COOKIE+27
110*d4fbbf0eSBarry Smith extern int DrawSPCreate(Draw,int,DrawSP *);
111*d4fbbf0eSBarry Smith extern int DrawSPDestroy(DrawSP);
112*d4fbbf0eSBarry Smith extern int DrawSPAddPoint(DrawSP,double*,double*);
113*d4fbbf0eSBarry Smith extern int DrawSPAddPoints(DrawSP,int,double**,double**);
114*d4fbbf0eSBarry Smith extern int DrawSPDraw(DrawSP);
115*d4fbbf0eSBarry Smith extern int DrawSPReset(DrawSP);
116*d4fbbf0eSBarry Smith extern int DrawSPSetDimension(DrawSP,int);
117*d4fbbf0eSBarry Smith extern int DrawSPGetAxis(DrawSP,DrawAxis *);
118*d4fbbf0eSBarry Smith extern int DrawSPGetDraw(DrawSP,Draw *);
119*d4fbbf0eSBarry Smith extern int DrawSPSetLimits(DrawSP,double,double,double,double);
120*d4fbbf0eSBarry Smith 
1215311e20fSBarry Smith extern int ViewerDrawGetDrawLG(Viewer, DrawLG*);
1225311e20fSBarry Smith 
1237aa781d9SBarry Smith #if defined(__VEC_PACKAGE)
124d7e8b826SBarry Smith int DrawTensorContour(Draw,int,int,double*,double*,Vec);
1257aa781d9SBarry Smith #endif
12612d3fcd6SBarry Smith 
12743e6b640SBarry Smith #endif
128