xref: /petsc/include/petscdraw.h (revision d6dfbf8f6aa26f18ad3ebf3c96fa582aa9714225)
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
6*d6dfbf8fSBarry Smith #include "petsc.h"
743e6b640SBarry Smith 
8f0479e8cSBarry Smith #define DRAW_COOKIE 0x101010
9f0479e8cSBarry Smith 
10*d6dfbf8fSBarry Smith /* types of draw contexts */
11*d6dfbf8fSBarry Smith #define XWINDOW 1
12*d6dfbf8fSBarry 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*d6dfbf8fSBarry Smith int DrawOpenX(MPI_Comm,char *,char *,int,int,int,int,DrawCtx*);
2443e6b640SBarry Smith int DrawDestroy(DrawCtx);
2543e6b640SBarry Smith 
268ed539a5SBarry Smith int DrawLine(DrawCtx,double,double,double,double,int,int);
2720563c6bSBarry Smith int DrawLineSetWidth(DrawCtx,double);
2843e6b640SBarry Smith 
298ed539a5SBarry Smith int DrawPoint(DrawCtx,double,double,int);
3020563c6bSBarry Smith int DrawPointSetSize(DrawCtx,double);
318ed539a5SBarry Smith 
328ed539a5SBarry Smith int DrawText(DrawCtx,double,double,int,char*);
3320563c6bSBarry Smith int DrawTextVertical(DrawCtx,double,double,int,char*);
3420563c6bSBarry Smith int DrawTextSetSize(DrawCtx,double,double);
3520563c6bSBarry Smith int DrawTextGetSize(DrawCtx,double*,double*);
368ed539a5SBarry Smith 
378ed539a5SBarry Smith int DrawSetViewPort(DrawCtx,double,double,double,double);
388ed539a5SBarry Smith int DrawSetCoordinates(DrawCtx,double,double,double,double);
39*d6dfbf8fSBarry Smith int DrawGetCoordinates(DrawCtx,double*,double*,double*,double*);
40*d6dfbf8fSBarry Smith 
418ed539a5SBarry Smith int DrawSetDoubleBuffer(DrawCtx);
428ed539a5SBarry Smith int DrawFlush(DrawCtx);
43*d6dfbf8fSBarry Smith int DrawSyncFlush(DrawCtx);
4420563c6bSBarry Smith int DrawClear(DrawCtx);
4520563c6bSBarry Smith 
4620563c6bSBarry Smith /* routines related to drawing Axis and line graphs */
4720563c6bSBarry Smith 
4820563c6bSBarry Smith typedef struct _DrawAxisCtx* DrawAxisCtx;
4920563c6bSBarry Smith typedef struct _DrawLGCtx*   DrawLGCtx;
5020563c6bSBarry Smith 
5120563c6bSBarry Smith int DrawAxisCreate(DrawCtx,DrawAxisCtx *);
5220563c6bSBarry Smith int DrawAxisDestroy(DrawAxisCtx);
5320563c6bSBarry Smith int DrawAxis(DrawAxisCtx);
5420563c6bSBarry Smith int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double);
5520563c6bSBarry Smith int DrawAxisSetColors(DrawAxisCtx,int,int,int);
5620563c6bSBarry Smith int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*);
5720563c6bSBarry Smith 
581eb62cbbSBarry Smith #define LG_COOKIE 0x17181920
5920563c6bSBarry Smith int DrawLGCreate(DrawCtx,int,DrawLGCtx *);
6020563c6bSBarry Smith int DrawLGDestroy(DrawLGCtx);
6120563c6bSBarry Smith int DrawLGAddPoint(DrawLGCtx,double*,double*);
621eb62cbbSBarry Smith int DrawLGAddPoints(DrawLGCtx,int,double**,double**);
6320563c6bSBarry Smith int DrawLG(DrawLGCtx);
64f0479e8cSBarry Smith int DrawLGReset(DrawLGCtx);
6520563c6bSBarry Smith int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *);
661eb62cbbSBarry Smith int DrawLGGetDrawCtx(DrawLGCtx,DrawCtx *);
6743e6b640SBarry Smith 
6843e6b640SBarry Smith #endif
69