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