1*d7e8b826SBarry Smith /* $Id: draw.h,v 1.18 1995/11/01 19:12:32 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 */ 129e25ed09SBarry Smith #define XWINDOW 0 134ac43724SBarry Smith #define NULLWINDOW 1 14d6dfbf8fSBarry Smith 15*d7e8b826SBarry 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 2020563c6bSBarry Smith #define DRAW_YELLOW 3 2120563c6bSBarry Smith #define DRAW_GREEN 4 2220563c6bSBarry Smith #define DRAW_CYAN 5 2320563c6bSBarry Smith #define DRAW_BLUE 6 2420563c6bSBarry Smith 25*d7e8b826SBarry Smith extern int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Draw*); 26*d7e8b826SBarry Smith extern int DrawOpenNull(MPI_Comm,Draw *); 27*d7e8b826SBarry Smith extern int DrawDestroy(Draw); 2843e6b640SBarry Smith 29*d7e8b826SBarry Smith extern int DrawLine(Draw,double,double,double,double,int); 30*d7e8b826SBarry Smith extern int DrawLineSetWidth(Draw,double); 3143e6b640SBarry Smith 32*d7e8b826SBarry Smith extern int DrawPoint(Draw,double,double,int); 33*d7e8b826SBarry Smith extern int DrawPointSetSize(Draw,double); 348ed539a5SBarry Smith 35*d7e8b826SBarry Smith extern int DrawRectangle(Draw,double,double,double,double,int,int,int,int); 36*d7e8b826SBarry Smith extern int DrawTriangle(Draw,double,double,double,double,double,double,int,int,int); 378ed539a5SBarry Smith 38*d7e8b826SBarry Smith extern int DrawText(Draw,double,double,int,char*); 39*d7e8b826SBarry Smith extern int DrawTextVertical(Draw,double,double,int,char*); 40*d7e8b826SBarry Smith extern int DrawTextSetSize(Draw,double,double); 41*d7e8b826SBarry Smith extern int DrawTextGetSize(Draw,double*,double*); 42d6dfbf8fSBarry Smith 43*d7e8b826SBarry Smith extern int DrawSetViewPort(Draw,double,double,double,double); 44*d7e8b826SBarry Smith extern int DrawSetCoordinates(Draw,double,double,double,double); 45*d7e8b826SBarry Smith extern int DrawGetCoordinates(Draw,double*,double*,double*,double*); 469e25ed09SBarry Smith 47*d7e8b826SBarry Smith extern int DrawSetPause(Draw,int); 48*d7e8b826SBarry Smith extern int DrawSetDoubleBuffer(Draw); 49*d7e8b826SBarry Smith extern int DrawFlush(Draw); 50*d7e8b826SBarry Smith extern int DrawSyncFlush(Draw); 51*d7e8b826SBarry Smith extern int DrawClear(Draw); 52*d7e8b826SBarry Smith extern int DrawPause(Draw); 53*d7e8b826SBarry Smith extern int DrawGetPause(Draw,int*); 54cddf8d76SBarry Smith 55cddf8d76SBarry Smith typedef enum {BUTTON_NONE, BUTTON_LEFT, BUTTON_CENTER, BUTTON_RIGHT } DrawButton; 56*d7e8b826SBarry Smith extern int DrawGetMouseButton(Draw,DrawButton *,double*,double *,double *,double *); 5720563c6bSBarry Smith 58*d7e8b826SBarry Smith typedef struct _DrawAxis* DrawAxis; 5983f0b094SBarry Smith #define AXIS_COOKIE PETSC_COOKIE+16 60*d7e8b826SBarry Smith extern int DrawAxisCreate(Draw,DrawAxis *); 61*d7e8b826SBarry Smith extern int DrawAxisDestroy(DrawAxis); 62*d7e8b826SBarry Smith extern int DrawAxisDraw(DrawAxis); 63*d7e8b826SBarry Smith extern int DrawAxisSetLimits(DrawAxis,double,double,double,double); 64*d7e8b826SBarry Smith extern int DrawAxisSetColors(DrawAxis,int,int,int); 65*d7e8b826SBarry Smith extern int DrawAxisSetLabels(DrawAxis,char*,char*,char*); 6620563c6bSBarry Smith 67*d7e8b826SBarry Smith typedef struct _DrawLG* DrawLG; 689e25ed09SBarry Smith #define LG_COOKIE PETSC_COOKIE+7 69*d7e8b826SBarry Smith extern int DrawLGCreate(Draw,int,DrawLG *); 70*d7e8b826SBarry Smith extern int DrawLGDestroy(DrawLG); 71*d7e8b826SBarry Smith extern int DrawLGAddPoint(DrawLG,double*,double*); 72*d7e8b826SBarry Smith extern int DrawLGAddPoints(DrawLG,int,double**,double**); 73*d7e8b826SBarry Smith extern int DrawLGDraw(DrawLG); 74*d7e8b826SBarry Smith extern int DrawLGReset(DrawLG); 75*d7e8b826SBarry Smith extern int DrawLGGetAxis(DrawLG,DrawAxis *); 76*d7e8b826SBarry Smith extern int DrawLGGetDraw(DrawLG,Draw *); 77*d7e8b826SBarry Smith extern int DrawLGIndicateDataPoints(DrawLG); 78*d7e8b826SBarry Smith extern int DrawLGSetLimits(DrawLG,double,double,double,double); 7943e6b640SBarry Smith 807aa781d9SBarry Smith #if defined(__VEC_PACKAGE) 81*d7e8b826SBarry Smith int DrawTensorContour(Draw,int,int,double*,double*,Vec); 827aa781d9SBarry Smith #endif 8312d3fcd6SBarry Smith 8443e6b640SBarry Smith #endif 85