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