xref: /petsc/include/petscdraw.h (revision bcd2baec2099d24a3a9d1d6033b0e7e45ccc83b9)
1*bcd2baecSBarry Smith /* $Id: draw.h,v 1.26 1996/01/03 14:42:03 curfman 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 */
129e25ed09SBarry Smith #define XWINDOW    0
134ac43724SBarry Smith #define NULLWINDOW 1
14d6dfbf8fSBarry Smith 
15d7e8b826SBarry Smith typedef struct _Draw* Draw;
1643e6b640SBarry Smith 
1720563c6bSBarry Smith #define DRAW_WHITE       0
1820563c6bSBarry Smith #define DRAW_BLACK       1
1920563c6bSBarry Smith #define DRAW_RED         2
20f8d5e24aSBarry Smith #define DRAW_GREEN       3
21f8d5e24aSBarry Smith #define DRAW_CYAN        4
22f8d5e24aSBarry Smith #define DRAW_BLUE        5
23f8d5e24aSBarry Smith #define DRAW_MAGENTA     6
24f8d5e24aSBarry Smith #define DRAW_AQUAMARINE  7
25f8d5e24aSBarry Smith #define DRAW_FORESTGREEN 8
26f8d5e24aSBarry Smith #define DRAW_ORANGE      9
27f8d5e24aSBarry Smith #define DRAW_VIOLET      10
28f8d5e24aSBarry Smith #define DRAW_BROWN       11
29f8d5e24aSBarry Smith #define DRAW_PINK        12
30f8d5e24aSBarry Smith #define DRAW_CORAL       13
31f8d5e24aSBarry Smith #define DRAW_GRAY        14
32f8d5e24aSBarry Smith #define DRAW_YELLOW      15
3320563c6bSBarry Smith 
34d7e8b826SBarry Smith extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Draw*);
35d7e8b826SBarry Smith extern int DrawOpenNull(MPI_Comm,Draw *);
36d7e8b826SBarry Smith extern int DrawDestroy(Draw);
3743e6b640SBarry Smith 
38*bcd2baecSBarry Smith extern int ViewerDrawGetDraw(Viewer, Draw*);
39*bcd2baecSBarry Smith 
40d7e8b826SBarry Smith extern int DrawLine(Draw,double,double,double,double,int);
41d7e8b826SBarry Smith extern int DrawLineSetWidth(Draw,double);
429a28b0a6SLois Curfman McInnes extern int DrawLineGetWidth(Draw,double*);
4343e6b640SBarry Smith 
44d7e8b826SBarry Smith extern int DrawPoint(Draw,double,double,int);
45d7e8b826SBarry Smith extern int DrawPointSetSize(Draw,double);
468ed539a5SBarry Smith 
47d7e8b826SBarry Smith extern int DrawRectangle(Draw,double,double,double,double,int,int,int,int);
48d7e8b826SBarry Smith extern int DrawTriangle(Draw,double,double,double,double,double,double,int,int,int);
498ed539a5SBarry Smith 
50d7e8b826SBarry Smith extern int DrawText(Draw,double,double,int,char*);
51d7e8b826SBarry Smith extern int DrawTextVertical(Draw,double,double,int,char*);
52d7e8b826SBarry Smith extern int DrawTextSetSize(Draw,double,double);
53d7e8b826SBarry Smith extern int DrawTextGetSize(Draw,double*,double*);
54d6dfbf8fSBarry Smith 
55d7e8b826SBarry Smith extern int DrawSetViewPort(Draw,double,double,double,double);
56d7e8b826SBarry Smith extern int DrawSetCoordinates(Draw,double,double,double,double);
57d7e8b826SBarry Smith extern int DrawGetCoordinates(Draw,double*,double*,double*,double*);
589e25ed09SBarry Smith 
59d7e8b826SBarry Smith extern int DrawSetPause(Draw,int);
60d7e8b826SBarry Smith extern int DrawSetDoubleBuffer(Draw);
61d7e8b826SBarry Smith extern int DrawFlush(Draw);
62d7e8b826SBarry Smith extern int DrawSyncFlush(Draw);
63d7e8b826SBarry Smith extern int DrawClear(Draw);
641a20e397SBarry Smith extern int DrawSyncClear(Draw);
65d7e8b826SBarry Smith extern int DrawPause(Draw);
66d7e8b826SBarry Smith extern int DrawGetPause(Draw,int*);
67cddf8d76SBarry Smith 
68cddf8d76SBarry Smith typedef enum {BUTTON_NONE, BUTTON_LEFT, BUTTON_CENTER, BUTTON_RIGHT } DrawButton;
69d7e8b826SBarry Smith extern int DrawGetMouseButton(Draw,DrawButton *,double*,double *,double *,double *);
7020563c6bSBarry Smith 
71d7e8b826SBarry Smith typedef struct _DrawAxis* DrawAxis;
7283f0b094SBarry Smith #define AXIS_COOKIE PETSC_COOKIE+16
73d7e8b826SBarry Smith extern int DrawAxisCreate(Draw,DrawAxis *);
74d7e8b826SBarry Smith extern int DrawAxisDestroy(DrawAxis);
75d7e8b826SBarry Smith extern int DrawAxisDraw(DrawAxis);
76d7e8b826SBarry Smith extern int DrawAxisSetLimits(DrawAxis,double,double,double,double);
77d7e8b826SBarry Smith extern int DrawAxisSetColors(DrawAxis,int,int,int);
78d7e8b826SBarry Smith extern int DrawAxisSetLabels(DrawAxis,char*,char*,char*);
7920563c6bSBarry Smith 
80d7e8b826SBarry Smith typedef struct _DrawLG*   DrawLG;
819e25ed09SBarry Smith #define LG_COOKIE PETSC_COOKIE+7
82d7e8b826SBarry Smith extern int DrawLGCreate(Draw,int,DrawLG *);
83d7e8b826SBarry Smith extern int DrawLGDestroy(DrawLG);
84d7e8b826SBarry Smith extern int DrawLGAddPoint(DrawLG,double*,double*);
85d7e8b826SBarry Smith extern int DrawLGAddPoints(DrawLG,int,double**,double**);
86d7e8b826SBarry Smith extern int DrawLGDraw(DrawLG);
87d7e8b826SBarry Smith extern int DrawLGReset(DrawLG);
88d7e8b826SBarry Smith extern int DrawLGGetAxis(DrawLG,DrawAxis *);
89d7e8b826SBarry Smith extern int DrawLGGetDraw(DrawLG,Draw *);
90d7e8b826SBarry Smith extern int DrawLGIndicateDataPoints(DrawLG);
91d7e8b826SBarry Smith extern int DrawLGSetLimits(DrawLG,double,double,double,double);
9243e6b640SBarry Smith 
937aa781d9SBarry Smith #if defined(__VEC_PACKAGE)
94d7e8b826SBarry Smith int DrawTensorContour(Draw,int,int,double*,double*,Vec);
957aa781d9SBarry Smith #endif
9612d3fcd6SBarry Smith 
9743e6b640SBarry Smith #endif
98