xref: /petsc/include/petscdraw.h (revision 7087cfbefd1a42b179f217f9994fb6cb0d0c1824)
143e6b640SBarry Smith /*
23fdcb5c1SBarry Smith   Interface to the PETSc graphics (currently only support for X-windows
343e6b640SBarry Smith */
40a835dfdSSatish Balay #if !defined(__PETSCDRAW_H)
50a835dfdSSatish Balay #define __PETSCDRAW_H
6d382aafbSBarry Smith #include "petscsys.h"
7e9fa29b7SSatish Balay PETSC_EXTERN_CXX_BEGIN
843e6b640SBarry Smith 
90700a824SBarry Smith extern PetscClassId PETSC_DRAW_CLASSID;
10f0479e8cSBarry Smith 
11b9617806SBarry Smith /*E
12b9617806SBarry Smith     PetscDrawType - String with the name of a PetscDraw
13b9617806SBarry Smith 
14b9617806SBarry Smith    Level: beginner
15b9617806SBarry Smith 
16b9617806SBarry Smith .seealso: PetscDrawSetType(), PetscDraw, PetscViewer
17b9617806SBarry Smith E*/
18a313700dSBarry Smith #define PetscDrawType  char*
19b0a32e0cSBarry Smith #define PETSC_DRAW_X     "x"
20b0a32e0cSBarry Smith #define PETSC_DRAW_NULL  "null"
21b0a32e0cSBarry Smith #define PETSC_DRAW_WIN32 "win32"
22d6dfbf8fSBarry Smith 
23b9617806SBarry Smith /*S
24b9617806SBarry Smith      PetscDraw - Abstract PETSc object for graphics
25b9617806SBarry Smith 
26b9617806SBarry Smith    Level: beginner
27b9617806SBarry Smith 
28b9617806SBarry Smith   Concepts: graphics
29b9617806SBarry Smith 
30b9617806SBarry Smith .seealso:  PetscDrawCreate(), PetscDrawSetType(), PetscDrawType
31b9617806SBarry Smith S*/
32b0a32e0cSBarry Smith typedef struct _p_PetscDraw* PetscDraw;
3343e6b640SBarry Smith 
34b0a32e0cSBarry Smith extern PetscFList PetscDrawList;
35*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegisterAll(const char[]);
36*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawInitializePackage(const char[]);
37*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegisterDestroy(void);
387b2a1423SBarry Smith 
39*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegister(const char*,const char*,const char*,PetscErrorCode(*)(PetscDraw));
4030de9b25SBarry Smith 
4130de9b25SBarry Smith /*MC
4230de9b25SBarry Smith    PetscDrawRegisterDynamic - Adds a method to the Krylov subspace solver package.
4330de9b25SBarry Smith 
4430de9b25SBarry Smith    Synopsis:
451890ba74SBarry Smith    PetscErrorCode PetscDrawRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PetscDraw))
4630de9b25SBarry Smith 
4730de9b25SBarry Smith    Not Collective
4830de9b25SBarry Smith 
4930de9b25SBarry Smith    Input Parameters:
5030de9b25SBarry Smith +  name_solver - name of a new user-defined solver
5130de9b25SBarry Smith .  path - path (either absolute or relative) the library containing this solver
5230de9b25SBarry Smith .  name_create - name of routine to create method context
5330de9b25SBarry Smith -  routine_create - routine to create method context
5430de9b25SBarry Smith 
5530de9b25SBarry Smith    Level: developer
5630de9b25SBarry Smith 
5730de9b25SBarry Smith    Notes:
5830de9b25SBarry Smith    PetscDrawRegisterDynamic() may be called multiple times to add several user-defined solvers.
5930de9b25SBarry Smith 
6030de9b25SBarry Smith    If dynamic libraries are used, then the fourth input argument (routine_create)
6130de9b25SBarry Smith    is ignored.
6230de9b25SBarry Smith 
6330de9b25SBarry Smith    Sample usage:
6430de9b25SBarry Smith .vb
6530de9b25SBarry Smith    PetscDrawRegisterDynamic("my_draw_type",/home/username/my_lib/lib/libO/solaris/mylib.a,
6630de9b25SBarry Smith                "MyDrawCreate",MyDrawCreate);
6730de9b25SBarry Smith .ve
6830de9b25SBarry Smith 
6930de9b25SBarry Smith    Then, your solver can be chosen with the procedural interface via
7030de9b25SBarry Smith $     PetscDrawSetType(ksp,"my_draw_type")
7130de9b25SBarry Smith    or at runtime via the option
7230de9b25SBarry Smith $     -draw_type my_draw_type
7330de9b25SBarry Smith 
7430de9b25SBarry Smith    Concepts: graphics^registering new draw classes
7530de9b25SBarry Smith    Concepts: PetscDraw^registering new draw classes
7630de9b25SBarry Smith 
7730de9b25SBarry Smith .seealso: PetscDrawRegisterAll(), PetscDrawRegisterDestroy()
7830de9b25SBarry Smith M*/
79aa482453SBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
80b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,0)
817b2a1423SBarry Smith #else
82b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,d)
837b2a1423SBarry Smith #endif
8430de9b25SBarry Smith 
85*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetType(PetscDraw,const PetscDrawType*);
86*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetType(PetscDraw,const PetscDrawType);
87*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*);
88*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetFromOptions(PetscDraw);
897b2a1423SBarry Smith 
900752156aSBarry Smith /*
910752156aSBarry Smith    Number of basic colors in the draw routines, the others are used
920752156aSBarry Smith    for a uniform colormap.
930752156aSBarry Smith */
94b0a32e0cSBarry Smith #define PETSC_DRAW_BASIC_COLORS 33
950752156aSBarry Smith 
96b0a32e0cSBarry Smith #define PETSC_DRAW_ROTATE          -1         /* will rotate through the colors, start with 2 */
97b0a32e0cSBarry Smith #define PETSC_DRAW_WHITE            0
98b0a32e0cSBarry Smith #define PETSC_DRAW_BLACK            1
99b0a32e0cSBarry Smith #define PETSC_DRAW_RED              2
100b0a32e0cSBarry Smith #define PETSC_DRAW_GREEN            3
101b0a32e0cSBarry Smith #define PETSC_DRAW_CYAN             4
102b0a32e0cSBarry Smith #define PETSC_DRAW_BLUE             5
103b0a32e0cSBarry Smith #define PETSC_DRAW_MAGENTA          6
104b0a32e0cSBarry Smith #define PETSC_DRAW_AQUAMARINE       7
105b0a32e0cSBarry Smith #define PETSC_DRAW_FORESTGREEN      8
106b0a32e0cSBarry Smith #define PETSC_DRAW_ORANGE           9
107b0a32e0cSBarry Smith #define PETSC_DRAW_VIOLET          10
108b0a32e0cSBarry Smith #define PETSC_DRAW_BROWN           11
109b0a32e0cSBarry Smith #define PETSC_DRAW_PINK            12
110b0a32e0cSBarry Smith #define PETSC_DRAW_CORAL           13
111b0a32e0cSBarry Smith #define PETSC_DRAW_GRAY            14
112b0a32e0cSBarry Smith #define PETSC_DRAW_YELLOW          15
11320563c6bSBarry Smith 
114b0a32e0cSBarry Smith #define PETSC_DRAW_GOLD            16
115b0a32e0cSBarry Smith #define PETSC_DRAW_LIGHTPINK       17
116b0a32e0cSBarry Smith #define PETSC_DRAW_MEDIUMTURQUOISE 18
117b0a32e0cSBarry Smith #define PETSC_DRAW_KHAKI           19
118b0a32e0cSBarry Smith #define PETSC_DRAW_DIMGRAY         20
119b0a32e0cSBarry Smith #define PETSC_DRAW_YELLOWGREEN     21
120b0a32e0cSBarry Smith #define PETSC_DRAW_SKYBLUE         22
121b0a32e0cSBarry Smith #define PETSC_DRAW_DARKGREEN       23
122b0a32e0cSBarry Smith #define PETSC_DRAW_NAVYBLUE        24
123b0a32e0cSBarry Smith #define PETSC_DRAW_SANDYBROWN      25
124b0a32e0cSBarry Smith #define PETSC_DRAW_CADETBLUE       26
125b0a32e0cSBarry Smith #define PETSC_DRAW_POWDERBLUE      27
126b0a32e0cSBarry Smith #define PETSC_DRAW_DEEPPINK        28
127b0a32e0cSBarry Smith #define PETSC_DRAW_THISTLE         29
128b0a32e0cSBarry Smith #define PETSC_DRAW_LIMEGREEN       30
129b0a32e0cSBarry Smith #define PETSC_DRAW_LAVENDERBLUSH   31
130b0a32e0cSBarry Smith #define PETSC_DRAW_PLUM            32
1310752156aSBarry Smith 
132*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenX(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*);
133*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenPS(MPI_Comm,char *,PetscDraw *);
134b0a32e0cSBarry Smith #define PETSC_DRAW_FULL_SIZE    -3
135b0a32e0cSBarry Smith #define PETSC_DRAW_HALF_SIZE    -4
136b0a32e0cSBarry Smith #define PETSC_DRAW_THIRD_SIZE   -5
137b0a32e0cSBarry Smith #define PETSC_DRAW_QUARTER_SIZE -6
138e340e5c6SBarry Smith 
139*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenNull(MPI_Comm,PetscDraw *);
140*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawDestroy(PetscDraw);
141*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawIsNull(PetscDraw,PetscBool *);
14243e6b640SBarry Smith 
143*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetPopup(PetscDraw,PetscDraw*);
144*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawCheckResizedWindow(PetscDraw);
145*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawResizeWindow(PetscDraw,int,int);
146d4fbbf0eSBarry Smith 
147*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawScalePopup(PetscDraw,PetscReal,PetscReal);
1485311e20fSBarry Smith 
149*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLine(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
150*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLineSetWidth(PetscDraw,PetscReal);
151*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLineGetWidth(PetscDraw,PetscReal*);
15243e6b640SBarry Smith 
153*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPoint(PetscDraw,PetscReal,PetscReal,int);
154*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPointSetSize(PetscDraw,PetscReal);
1558ed539a5SBarry Smith 
156*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRectangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int,int);
157*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTriangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int);
158*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawEllipse(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
159*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTensorContourPatch(PetscDraw,int,int,PetscReal*,PetscReal*,PetscReal,PetscReal,PetscReal*);
160*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTensorContour(PetscDraw,int,int,const PetscReal[],const PetscReal[],PetscReal *);
1618ed539a5SBarry Smith 
162*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawString(PetscDraw,PetscReal,PetscReal,int,const char[]);
163*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringVertical(PetscDraw,PetscReal,PetscReal,int,const char[]);
164*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringSetSize(PetscDraw,PetscReal,PetscReal);
165*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringGetSize(PetscDraw,PetscReal*,PetscReal*);
166d6dfbf8fSBarry Smith 
167*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetViewPort(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
168*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSplitViewPort(PetscDraw);
1692bdab257SBarry Smith 
170*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetCoordinates(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
171*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetCoordinates(PetscDraw,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
1729e25ed09SBarry Smith 
173*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetTitle(PetscDraw,const char[]);
174*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAppendTitle(PetscDraw,const char[]);
175*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetTitle(PetscDraw,char **);
176d4fbbf0eSBarry Smith 
177*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetPause(PetscDraw,PetscReal);
178*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetPause(PetscDraw,PetscReal*);
179*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPause(PetscDraw);
180*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetDoubleBuffer(PetscDraw);
181*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawFlush(PetscDraw);
182*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedFlush(PetscDraw);
183*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawClear(PetscDraw);
184*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedClear(PetscDraw);
185*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawBOP(PetscDraw);
186*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawEOP(PetscDraw);
187cddf8d76SBarry Smith 
188*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetDisplay(PetscDraw,char*);
189a3489287SBarry Smith #define PetscDrawSetFilename(a,b) PetscDrawSetDisplay(a,b)
190a3489287SBarry Smith 
191*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetSingleton(PetscDraw,PetscDraw*);
192*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRestoreSingleton(PetscDraw,PetscDraw*);
1936831982aSBarry Smith 
194b9617806SBarry Smith /*E
195b9617806SBarry Smith     PetscDrawButton - Used to determine which button was pressed
196b9617806SBarry Smith 
197b9617806SBarry Smith    Level: intermediate
198b9617806SBarry Smith 
199b9617806SBarry Smith .seealso: PetscDrawGetMouseButton(), PetscDrawSynchronizedGetMouseButton()
200b9617806SBarry Smith E*/
2014ebda54eSMatthew Knepley typedef enum {BUTTON_NONE,BUTTON_LEFT,BUTTON_CENTER,BUTTON_RIGHT,BUTTON_LEFT_SHIFT,BUTTON_CENTER_SHIFT,BUTTON_RIGHT_SHIFT} PetscDrawButton;
202b9617806SBarry Smith 
203*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *);
204*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *);
20520563c6bSBarry Smith 
206*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawZoom(PetscDraw,PetscErrorCode (*)(PetscDraw,void *),void *);
2077c922b88SBarry Smith 
208b9617806SBarry Smith /*S
209b9617806SBarry Smith      PetscDrawViewPorts - Subwindows in a PetscDraw object
210b9617806SBarry Smith 
211b9617806SBarry Smith    Level: intermediate
212b9617806SBarry Smith 
213b9617806SBarry Smith   Concepts: graphics
214b9617806SBarry Smith 
215b9617806SBarry Smith .seealso:  PetscDrawViewPortsCreate(), PetscDrawViewPortsSet()
216b9617806SBarry Smith S*/
2177c922b88SBarry Smith typedef struct {
2187c307921SBarry Smith   PetscInt  nports;
21967e28bfeSBarry Smith   PetscReal *xl;
22067e28bfeSBarry Smith   PetscReal *xr;
22167e28bfeSBarry Smith   PetscReal *yl;
22267e28bfeSBarry Smith   PetscReal *yr;
223b0a32e0cSBarry Smith   PetscDraw draw;
224b0a32e0cSBarry Smith } PetscDrawViewPorts;
225*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsCreate(PetscDraw,PetscInt,PetscDrawViewPorts**);
226*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsCreateRect(PetscDraw,PetscInt,PetscInt,PetscDrawViewPorts**);
227*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsDestroy(PetscDrawViewPorts*);
228*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsSet(PetscDrawViewPorts*,PetscInt);
2297c922b88SBarry Smith 
230b9617806SBarry Smith /*S
231b9617806SBarry Smith      PetscDrawAxis - Manages X-Y axis
232b9617806SBarry Smith 
233b9617806SBarry Smith    Level: advanced
234b9617806SBarry Smith 
235b9617806SBarry Smith   Concepts: graphics, axis
236b9617806SBarry Smith 
237b9617806SBarry Smith .seealso:  PetscDrawAxisCreate(), PetscDrawAxisSetLimits(), PetscDrawAxisSetColors(), PetscDrawAxisSetLabels()
238b9617806SBarry Smith S*/
239b0a32e0cSBarry Smith typedef struct _p_DrawAxis* PetscDrawAxis;
240b9617806SBarry Smith 
2410700a824SBarry Smith extern PetscClassId DRAWAXIS_CLASSID;
2428ba1e511SMatthew Knepley 
243*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisCreate(PetscDraw,PetscDrawAxis *);
244*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisDestroy(PetscDrawAxis);
245*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisDraw(PetscDrawAxis);
246*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetLimits(PetscDrawAxis,PetscReal,PetscReal,PetscReal,PetscReal);
247*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetHoldLimits(PetscDrawAxis,PetscBool );
248*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetColors(PetscDrawAxis,int,int,int);
249*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetLabels(PetscDrawAxis,const char[],const char[],const char[]);
25020563c6bSBarry Smith 
251b9617806SBarry Smith /*S
252b9617806SBarry Smith      PetscDrawLG - Manages drawing x-y plots
253b9617806SBarry Smith 
254b9617806SBarry Smith    Level: advanced
255b9617806SBarry Smith 
256b9617806SBarry Smith   Concepts: graphics, axis
257b9617806SBarry Smith 
258b9617806SBarry Smith .seealso:  PetscDrawAxisCreate(), PetscDrawLGCreate(), PetscDrawLGAddPoint()
259b9617806SBarry Smith S*/
260b0a32e0cSBarry Smith typedef struct _p_DrawLG*   PetscDrawLG;
261b9617806SBarry Smith 
2620700a824SBarry Smith extern PetscClassId DRAWLG_CLASSID;
2638ba1e511SMatthew Knepley 
264*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGCreate(PetscDraw,int,PetscDrawLG *);
265*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGDestroy(PetscDrawLG);
266*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGAddPoint(PetscDrawLG,PetscReal*,PetscReal*);
267*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGAddPoints(PetscDrawLG,int,PetscReal**,PetscReal**);
268*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGDraw(PetscDrawLG);
269*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGPrint(PetscDrawLG);
270*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGReset(PetscDrawLG);
271*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSetDimension(PetscDrawLG,PetscInt);
272*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGGetAxis(PetscDrawLG,PetscDrawAxis *);
273*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGGetDraw(PetscDrawLG,PetscDraw *);
274*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGIndicateDataPoints(PetscDrawLG);
275*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSetLimits(PetscDrawLG,PetscReal,PetscReal,PetscReal,PetscReal);
27643e6b640SBarry Smith 
277b9617806SBarry Smith /*S
278b9617806SBarry Smith      PetscDrawSP - Manages drawing scatter plots
279b9617806SBarry Smith 
280b9617806SBarry Smith    Level: advanced
281b9617806SBarry Smith 
282b9617806SBarry Smith   Concepts: graphics, scatter plots
283b9617806SBarry Smith 
284b9617806SBarry Smith .seealso:  PetscDrawSPCreate()
285b9617806SBarry Smith S*/
286b0a32e0cSBarry Smith typedef struct _p_DrawSP*   PetscDrawSP;
287b9617806SBarry Smith 
2880700a824SBarry Smith extern PetscClassId DRAWSP_CLASSID;
2898ba1e511SMatthew Knepley 
290*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPCreate(PetscDraw,int,PetscDrawSP *);
291*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPDestroy(PetscDrawSP);
292*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPAddPoint(PetscDrawSP,PetscReal*,PetscReal*);
293*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPAddPoints(PetscDrawSP,int,PetscReal**,PetscReal**);
294*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPDraw(PetscDrawSP);
295*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPReset(PetscDrawSP);
296*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPSetDimension(PetscDrawSP,int);
297*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPGetAxis(PetscDrawSP,PetscDrawAxis *);
298*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPGetDraw(PetscDrawSP,PetscDraw *);
299*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPSetLimits(PetscDrawSP,PetscReal,PetscReal,PetscReal,PetscReal);
300*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSPDraw(PetscDrawLG,PetscDrawSP);
301d4fbbf0eSBarry Smith 
302b9617806SBarry Smith /*S
303b9617806SBarry Smith      PetscDrawHG - Manages drawing histograms
304b9617806SBarry Smith 
305b9617806SBarry Smith    Level: advanced
306b9617806SBarry Smith 
307b9617806SBarry Smith   Concepts: graphics, histograms
308b9617806SBarry Smith 
309b9617806SBarry Smith .seealso:  PetscDrawHGCreate()
310b9617806SBarry Smith S*/
311b0a32e0cSBarry Smith typedef struct _p_DrawHG*   PetscDrawHG;
312b9617806SBarry Smith 
3130700a824SBarry Smith extern PetscClassId DRAWHG_CLASSID;
3148ba1e511SMatthew Knepley 
315*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGCreate(PetscDraw,int,PetscDrawHG *);
316*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGDestroy(PetscDrawHG);
317*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGAddValue(PetscDrawHG,PetscReal);
318*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGDraw(PetscDrawHG);
319*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGPrint(PetscDrawHG);
320*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGReset(PetscDrawHG);
321*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGGetAxis(PetscDrawHG,PetscDrawAxis *);
322*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGGetDraw(PetscDrawHG,PetscDraw *);
323*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetLimits(PetscDrawHG,PetscReal,PetscReal,int,int);
324*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetNumberBins(PetscDrawHG,int);
325*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetColor(PetscDrawHG,int);
326*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGCalcStats(PetscDrawHG, PetscBool );
327*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGIntegerBins(PetscDrawHG, PetscBool );
328ba6fa466SBarry Smith 
329ba6fa466SBarry Smith /*
330b0a32e0cSBarry Smith     PetscViewer routines that allow you to access underlying PetscDraw objects
3313f1d51d7SBarry Smith */
332*7087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDraw(PetscViewer,PetscInt,PetscDraw*);
333*7087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawBaseAdd(PetscViewer,PetscInt);
334*7087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawBaseSet(PetscViewer,PetscInt);
335*7087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDrawLG(PetscViewer,PetscInt,PetscDrawLG*);
336*7087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDrawAxis(PetscViewer,PetscInt,PetscDrawAxis*);
3375311e20fSBarry Smith 
338*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawUtilitySetCmapHue(unsigned char *,unsigned char *,unsigned char *,int);
339*7087cfbeSBarry Smith extern PetscErrorCode  PetscDrawUtilitySetGamma(PetscReal);
3407c922b88SBarry Smith 
341e9fa29b7SSatish Balay PETSC_EXTERN_CXX_END
34243e6b640SBarry Smith #endif
343