xref: /petsc/src/sys/classes/draw/interface/dclear.c (revision df4cd43f92eaa320656440c40edb1046daee8f75)
1 /*
2        Provides the calling sequences for all the basic PetscDraw routines.
3 */
4 #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/
5 
6 /*@
7    PetscDrawClear - Clears graphical output. All processors must call this routine.
8    Does not return until the draw in context is clear.
9 
10    Collective
11 
12    Input Parameters:
13 .  draw - the drawing context
14 
15    Level: intermediate
16 
17 @*/
18 PetscErrorCode PetscDrawClear(PetscDraw draw)
19 {
20   PetscFunctionBegin;
21   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
22   if (draw->saveonclear) PetscCall(PetscDrawSave(draw));
23   PetscTryTypeMethod(draw, clear);
24   PetscFunctionReturn(PETSC_SUCCESS);
25 }
26 
27 /*@
28    PetscDrawBOP - Begins a new page or frame on the selected graphical device.
29 
30    Logically Collective
31 
32    Input Parameter:
33 .  draw - the drawing context
34 
35    Level: advanced
36 
37 .seealso: `PetscDrawEOP()`, `PetscDrawClear()`
38 @*/
39 PetscErrorCode PetscDrawBOP(PetscDraw draw)
40 {
41   PetscFunctionBegin;
42   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
43   PetscTryTypeMethod(draw, beginpage);
44   PetscFunctionReturn(PETSC_SUCCESS);
45 }
46 /*@
47    PetscDrawEOP - Ends a page or frame on the selected graphical device.
48 
49    Logically Collective
50 
51    Input Parameter:
52 .  draw - the drawing context
53 
54    Level: advanced
55 
56 .seealso: `PetscDrawBOP()`, `PetscDrawClear()`
57 @*/
58 PetscErrorCode PetscDrawEOP(PetscDraw draw)
59 {
60   PetscFunctionBegin;
61   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
62   PetscTryTypeMethod(draw, endpage);
63   PetscFunctionReturn(PETSC_SUCCESS);
64 }
65