xref: /petsc/src/sys/classes/draw/interface/dclear.c (revision ebead697dbf761eb322f829370bbe90b3bd93fa3)
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 {
20   PetscFunctionBegin;
21   PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1);
22   if (draw->saveonclear) PetscCall(PetscDrawSave(draw));
23   if (draw->ops->clear) PetscCall((*draw->ops->clear)(draw));
24   PetscFunctionReturn(0);
25 }
26 
27 /*@
28    PetscDrawBOP - Begins a new page or frame on the selected graphical device.
29 
30    Logically Collective on PetscDraw
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   if (draw->ops->beginpage) PetscCall((*draw->ops->beginpage)(draw));
44   PetscFunctionReturn(0);
45 }
46 /*@
47    PetscDrawEOP - Ends a page or frame on the selected graphical device.
48 
49    Logically Collective on PetscDraw
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   if (draw->ops->endpage) PetscCall((*draw->ops->endpage)(draw));
63   PetscFunctionReturn(0);
64 }
65