xref: /petsc/include/petscdraw.h (revision 20563c6b1ea7b82b48c81bbd22ce9170a8c92d3b)
1 /*
2   Public include file for all of the PETSc graphics routines
3 */
4 #if !defined(__DRAW_H)
5 #define __DRAW_H
6 
7 typedef struct _DrawCtx* DrawCtx;
8 
9 #define DRAW_WHITE  0
10 #define DRAW_BLACK  1
11 #define DRAW_RED    2
12 #define DRAW_YELLOW 3
13 #define DRAW_GREEN  4
14 #define DRAW_CYAN   5
15 #define DRAW_BLUE   6
16 
17 int DrawOpenX(char*,char *,int,int,int,int,DrawCtx*);
18 int DrawDestroy(DrawCtx);
19 
20 int DrawLine(DrawCtx,double,double,double,double,int,int);
21 int DrawLineSetWidth(DrawCtx,double);
22 
23 int DrawPoint(DrawCtx,double,double,int);
24 int DrawPointSetSize(DrawCtx,double);
25 
26 int DrawText(DrawCtx,double,double,int,char*);
27 int DrawTextVertical(DrawCtx,double,double,int,char*);
28 int DrawTextSetSize(DrawCtx,double,double);
29 int DrawTextGetSize(DrawCtx,double*,double*);
30 
31 int DrawSetViewPort(DrawCtx,double,double,double,double);
32 int DrawSetCoordinates(DrawCtx,double,double,double,double);
33 int DrawSetDoubleBuffer(DrawCtx);
34 int DrawFlush(DrawCtx);
35 int DrawClear(DrawCtx);
36 
37 /* routines related to drawing Axis and line graphs */
38 
39 typedef struct _DrawAxisCtx* DrawAxisCtx;
40 typedef struct _DrawLGCtx*   DrawLGCtx;
41 
42 int DrawAxisCreate(DrawCtx,DrawAxisCtx *);
43 int DrawAxisDestroy(DrawAxisCtx);
44 int DrawAxis(DrawAxisCtx);
45 int DrawAxisSetLimits(DrawAxisCtx,double,double,double,double);
46 int DrawAxisSetColors(DrawAxisCtx,int,int,int);
47 int DrawAxisSetLabels(DrawAxisCtx,char*,char*,char*);
48 
49 int DrawLGCreate(DrawCtx,int,DrawLGCtx *);
50 int DrawLGDestroy(DrawLGCtx);
51 int DrawLGAddPoint(DrawLGCtx,double*,double*);
52 int DrawLG(DrawLGCtx);
53 int DrawLGGetAxisCtx(DrawLGCtx,DrawAxisCtx *);
54 
55 #endif
56