xref: /petsc/src/sys/classes/draw/interface/dclear.c (revision 9371c9d470a9602b6d10a8bf50c9b2280a79e45a)
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 on PetscDraw
11 
12    Input Parameters:
13 .  draw - the drawing context
14 
15    Level: intermediate
16 
17 @*/
18 PetscErrorCode PetscDrawClear(PetscDraw draw) {
19   PetscFunctionBegin;
20   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
21   if (draw->saveonclear) PetscCall(PetscDrawSave(draw));
22   PetscTryTypeMethod(draw, clear);
23   PetscFunctionReturn(0);
24 }
25 
26 /*@
27    PetscDrawBOP - Begins a new page or frame on the selected graphical device.
28 
29    Logically Collective on PetscDraw
30 
31    Input Parameter:
32 .  draw - the drawing context
33 
34    Level: advanced
35 
36 .seealso: `PetscDrawEOP()`, `PetscDrawClear()`
37 @*/
38 PetscErrorCode PetscDrawBOP(PetscDraw draw) {
39   PetscFunctionBegin;
40   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
41   PetscTryTypeMethod(draw, beginpage);
42   PetscFunctionReturn(0);
43 }
44 /*@
45    PetscDrawEOP - Ends a page or frame on the selected graphical device.
46 
47    Logically Collective on PetscDraw
48 
49    Input Parameter:
50 .  draw - the drawing context
51 
52    Level: advanced
53 
54 .seealso: `PetscDrawBOP()`, `PetscDrawClear()`
55 @*/
56 PetscErrorCode PetscDrawEOP(PetscDraw draw) {
57   PetscFunctionBegin;
58   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
59   PetscTryTypeMethod(draw, endpage);
60   PetscFunctionReturn(0);
61 }
62