xref: /petsc/include/petscdraw.h (revision 9e25ed09632ec91e2227f4e6f1ce3bfe794e20d8)
143e6b640SBarry Smith /*
243e6b640SBarry Smith   Public include file for all of the PETSc graphics routines
343e6b640SBarry Smith */
41eb62cbbSBarry Smith #if !defined(__DRAW_PACKAGE)
51eb62cbbSBarry Smith #define __DRAW_PACKAGE
6d6dfbf8fSBarry Smith #include "petsc.h"
743e6b640SBarry Smith 
8*9e25ed09SBarry Smith #define DRAW_COOKIE PETSC_COOKIE+6
9f0479e8cSBarry Smith 
10d6dfbf8fSBarry Smith /* types of draw contexts */
11*9e25ed09SBarry Smith #define XWINDOW 0
12d6dfbf8fSBarry Smith 
1343e6b640SBarry Smith typedef struct _DrawCtx* DrawCtx;
1443e6b640SBarry Smith 
1520563c6bSBarry Smith #define DRAW_WHITE  0
1620563c6bSBarry Smith #define DRAW_BLACK  1
1720563c6bSBarry Smith #define DRAW_RED    2
1820563c6bSBarry Smith #define DRAW_YELLOW 3
1920563c6bSBarry Smith #define DRAW_GREEN  4
2020563c6bSBarry Smith #define DRAW_CYAN   5
2120563c6bSBarry Smith #define DRAW_BLUE   6
2220563c6bSBarry Smith 
23*9e25ed09SBarry Smith extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,DrawCtx*);
24*9e25ed09SBarry Smith extern int DrawDestroy(DrawCtx);
2543e6b640SBarry Smith 
26*9e25ed09SBarry Smith extern int DrawLine(DrawCtx,double,double,double,double,int,int);
27*9e25ed09SBarry Smith extern int DrawLineSetWidth(DrawCtx,double);
2843e6b640SBarry Smith 
29*9e25ed09SBarry Smith extern int DrawPoint(DrawCtx,double,double,int);
30*9e25ed09SBarry Smith extern int DrawPointSetSize(DrawCtx,double);
318ed539a5SBarry Smith 
32*9e25ed09SBarry Smith extern int DrawRectangle(DrawCtx,double,double,double,double,int,int,int,int);
33*9e25ed09SBarry Smith extern int DrawTriangle(DrawCtx,double,double,double,double,double,double,int,int,int);
348ed539a5SBarry Smith 
35*9e25ed09SBarry Smith extern int DrawText(DrawCtx,double,double,int,char*);
36*9e25ed09SBarry Smith extern int DrawTextVertical(DrawCtx,double,double,int,char*);
37*9e25ed09SBarry Smith extern int DrawTextSetSize(DrawCtx,double,double);
38*9e25ed09SBarry Smith extern int DrawTextGetSize(DrawCtx,double*,double*);
39d6dfbf8fSBarry Smith 
40*9e25ed09SBarry Smith extern int DrawSetViewPort(DrawCtx,double,double,double,double);
41*9e25ed09SBarry Smith extern int DrawSetCoordinates(DrawCtx,double,double,double,double);
42*9e25ed09SBarry Smith extern int DrawGetCoordinates(DrawCtx,double*,double*,double*,double*);
43*9e25ed09SBarry Smith 
44*9e25ed09SBarry Smith extern int DrawSetPause(DrawCtx,int);
45*9e25ed09SBarry Smith extern int DrawSetDoubleBuffer(DrawCtx);
46*9e25ed09SBarry Smith extern int DrawFlush(DrawCtx);
47*9e25ed09SBarry Smith extern int DrawSyncFlush(DrawCtx);
48*9e25ed09SBarry Smith extern int DrawClear(DrawCtx);
4920563c6bSBarry Smith 
5020563c6bSBarry Smith /* routines related to drawing Axis and line graphs */
5120563c6bSBarry Smith 
5220563c6bSBarry Smith typedef struct _DrawAxisCtx* DrawAxisCtx;
5320563c6bSBarry Smith typedef struct _DrawLGCtx*   DrawLGCtx;
5420563c6bSBarry Smith 
55*9e25ed09SBarry Smith extern int DrawAxisCreate(DrawCtx,DrawAxisCtx *);
56*9e25ed09SBarry Smith extern int DrawAxisDestroy(DrawAxisCtx);
57*9e25ed09SBarry Smith extern int DrawAxis(DrawAxisCtx);
58*9e25ed09SBarry Smith extern int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double);
59*9e25ed09SBarry Smith extern int DrawAxisSetColors(DrawAxisCtx,int,int,int);
60*9e25ed09SBarry Smith extern int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*);
6120563c6bSBarry Smith 
62*9e25ed09SBarry Smith #define LG_COOKIE PETSC_COOKIE+7
63*9e25ed09SBarry Smith extern int DrawLGCreate(DrawCtx,int,DrawLGCtx *);
64*9e25ed09SBarry Smith extern int DrawLGDestroy(DrawLGCtx);
65*9e25ed09SBarry Smith extern int DrawLGAddPoint(DrawLGCtx,double*,double*);
66*9e25ed09SBarry Smith extern int DrawLGAddPoints(DrawLGCtx,int,double**,double**);
67*9e25ed09SBarry Smith extern int DrawLG(DrawLGCtx);
68*9e25ed09SBarry Smith extern int DrawLGReset(DrawLGCtx);
69*9e25ed09SBarry Smith extern int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *);
70*9e25ed09SBarry Smith extern int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *);
7143e6b640SBarry Smith 
7243e6b640SBarry Smith #endif
73