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