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->saveonclear) {ierr = PetscDrawSave(draw);CHKERRQ(ierr);} 29 if (draw->ops->clear) { 30 ierr = (*draw->ops->clear)(draw);CHKERRQ(ierr); 31 } 32 PetscFunctionReturn(0); 33 } 34 35 #undef __FUNCT__ 36 #define __FUNCT__ "PetscDrawBOP" 37 /*@ 38 PetscDrawBOP - Begins a new page or frame on the selected graphical device. 39 40 Logically Collective on PetscDraw 41 42 Input Parameter: 43 . draw - the drawing context 44 45 Level: advanced 46 47 .seealso: PetscDrawEOP(), PetscDrawClear() 48 @*/ 49 PetscErrorCode PetscDrawBOP(PetscDraw draw) 50 { 51 PetscErrorCode ierr; 52 53 PetscFunctionBegin; 54 PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 55 if (draw->ops->beginpage) { 56 ierr = (*draw->ops->beginpage)(draw);CHKERRQ(ierr); 57 } 58 PetscFunctionReturn(0); 59 } 60 #undef __FUNCT__ 61 #define __FUNCT__ "PetscDrawEOP" 62 /*@ 63 PetscDrawEOP - Ends a page or frame on the selected graphical device. 64 65 Logically Collective on PetscDraw 66 67 Input Parameter: 68 . draw - the drawing context 69 70 Level: advanced 71 72 .seealso: PetscDrawBOP(), PetscDrawClear() 73 @*/ 74 PetscErrorCode PetscDrawEOP(PetscDraw draw) 75 { 76 PetscErrorCode ierr; 77 78 PetscFunctionBegin; 79 PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 80 if (draw->ops->endpage) { 81 ierr = (*draw->ops->endpage)(draw);CHKERRQ(ierr); 82 } 83 PetscFunctionReturn(0); 84 } 85