xref: /petsc/src/sys/classes/draw/interface/dflush.c (revision f97672e55eacc8688507b9471cd7ec2664d7f203)
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    PetscDrawFlush - Flushes graphical output.
8 
9    Collective on PetscDraw
10 
11    Input Parameters:
12 .  draw - the drawing context
13 
14    Level: beginner
15 
16 .seealso: `PetscDrawClear()`
17 @*/
18 PetscErrorCode  PetscDrawFlush(PetscDraw draw)
19 {
20   PetscFunctionBegin;
21   PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1);
22   if (draw->ops->flush) {
23     PetscCall((*draw->ops->flush)(draw));
24   }
25   if (draw->saveonflush) PetscCall(PetscDrawSave(draw));
26   PetscFunctionReturn(0);
27 }
28