Actual source code: drawimpl.h
petsc-3.3-p7 2013-05-11
1: /*
2: Abstract data structure and functions for graphics.
3: */
5: #if !defined(_DRAWIMPL_H)
6: #define _DRAWIMPL_H
8: #include <petscsys.h>
10: struct _PetscDrawOps {
11: PetscErrorCode (*setdoublebuffer)(PetscDraw);
12: PetscErrorCode (*flush)(PetscDraw);
13: PetscErrorCode (*line)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
14: PetscErrorCode (*linesetwidth)(PetscDraw,PetscReal);
15: PetscErrorCode (*linegetwidth)(PetscDraw,PetscReal*);
16: PetscErrorCode (*point)(PetscDraw,PetscReal,PetscReal,int);
17: PetscErrorCode (*pointsetsize)(PetscDraw,PetscReal);
18: PetscErrorCode (*string)(PetscDraw,PetscReal,PetscReal,int,const char[]);
19: PetscErrorCode (*stringvertical)(PetscDraw,PetscReal,PetscReal,int,const char[]);
20: PetscErrorCode (*stringsetsize)(PetscDraw,PetscReal,PetscReal);
21: PetscErrorCode (*stringgetsize)(PetscDraw,PetscReal*,PetscReal*);
22: PetscErrorCode (*setviewport)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
23: PetscErrorCode (*clear)(PetscDraw);
24: PetscErrorCode (*synchronizedflush)(PetscDraw);
25: PetscErrorCode (*rectangle)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int,int);
26: PetscErrorCode (*triangle)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int);
27: PetscErrorCode (*ellipse)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
28: PetscErrorCode (*getmousebutton)(PetscDraw,PetscDrawButton*,PetscReal *,PetscReal *,PetscReal*,PetscReal*);
29: PetscErrorCode (*pause)(PetscDraw);
30: PetscErrorCode (*synchronizedclear)(PetscDraw);
31: PetscErrorCode (*beginpage)(PetscDraw);
32: PetscErrorCode (*endpage)(PetscDraw);
33: PetscErrorCode (*getpopup)(PetscDraw,PetscDraw*);
34: PetscErrorCode (*settitle)(PetscDraw,const char[]);
35: PetscErrorCode (*checkresizedwindow)(PetscDraw);
36: PetscErrorCode (*resizewindow)(PetscDraw,int,int);
37: PetscErrorCode (*destroy)(PetscDraw);
38: PetscErrorCode (*view)(PetscDraw,PetscViewer);
39: PetscErrorCode (*getsingleton)(PetscDraw,PetscDraw*);
40: PetscErrorCode (*restoresingleton)(PetscDraw,PetscDraw*);
41: PetscErrorCode (*save)(PetscDraw);
42: PetscErrorCode (*setsave)(PetscDraw,const char*);
43: PetscErrorCode (*setcoordinates)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
44: PetscErrorCode (*arrow)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
45: };
47: struct _p_PetscDraw {
48: PETSCHEADER(struct _PetscDrawOps);
49: PetscReal pause; /* sleep time after a synchronized flush */
50: PetscReal port_xl,port_yl,port_xr,port_yr;
51: PetscReal coor_xl,coor_yl,coor_xr,coor_yr;
52: char *title;
53: char *display;
54: PetscDraw popup;
55: int x,y,h,w;
56: char *savefilename;
57: PetscInt savefilecount;
58: PetscBool savefilemovie;
59: void *data;
60: };
62: #endif