Actual source code: drawimpl.h

      1: /*
      2:        Abstract data structure and functions for graphics.
      3: */

      5: #if !defined(_DRAWIMPL_H)
      6: #define _DRAWIMPL_H

     8:  #include petsc.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 (*setcoordinates)(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
     42: };

     44: struct _p_PetscDraw {
     45:   PETSCHEADER(struct _PetscDrawOps);
     46:   int             pause;       /* sleep time after a synchronized flush */
     47:   PetscReal       port_xl,port_yl,port_xr,port_yr;
     48:   PetscReal       coor_xl,coor_yl,coor_xr,coor_yr;
     49:   char            *title;
     50:   char            *display;
     51:   PetscDraw       popup;
     52:   int             x,y,h,w;
     53:   void            *data;
     54: };

     56: #endif