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