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 #undef __FUNCT__ 7 #define __FUNCT__ "PetscDrawClear" 8 /*@ 9 PetscDrawClear - Clears graphical output. All processors must call this routine. 10 Does not return until the draw in context is clear. 11 12 Collective on PetscDraw 13 14 Input Parameters: 15 . draw - the drawing context 16 17 Level: intermediate 18 19 Concepts: clear^window 20 21 @*/ 22 PetscErrorCode PetscDrawClear(PetscDraw draw) 23 { 24 PetscErrorCode ierr; 25 26 PetscFunctionBegin; 27 PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 28 if (draw->ops->clear) { 29 ierr = (*draw->ops->clear)(draw);CHKERRQ(ierr); 30 } 31 PetscFunctionReturn(0); 32 } 33 34 #undef __FUNCT__ 35 #define __FUNCT__ "PetscDrawBOP" 36 /*@ 37 PetscDrawBOP - Begins a new page or frame on the selected graphical device. 38 39 Logically Collective on PetscDraw 40 41 Input Parameter: 42 . draw - the drawing context 43 44 Level: advanced 45 46 .seealso: PetscDrawEOP(), PetscDrawClear() 47 @*/ 48 PetscErrorCode PetscDrawBOP(PetscDraw draw) 49 { 50 PetscErrorCode ierr; 51 52 PetscFunctionBegin; 53 PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 54 if (draw->ops->beginpage) { 55 ierr = (*draw->ops->beginpage)(draw);CHKERRQ(ierr); 56 } 57 PetscFunctionReturn(0); 58 } 59 #undef __FUNCT__ 60 #define __FUNCT__ "PetscDrawEOP" 61 /*@ 62 PetscDrawEOP - Ends a page or frame on the selected graphical device. 63 64 Logically Collective on PetscDraw 65 66 Input Parameter: 67 . draw - the drawing context 68 69 Level: advanced 70 71 .seealso: PetscDrawBOP(), PetscDrawClear() 72 @*/ 73 PetscErrorCode PetscDrawEOP(PetscDraw draw) 74 { 75 PetscErrorCode ierr; 76 77 PetscFunctionBegin; 78 PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 79 if (draw->ops->endpage) { 80 ierr = (*draw->ops->endpage)(draw);CHKERRQ(ierr); 81 } 82 PetscFunctionReturn(0); 83 } 84