xref: /petsc/src/sys/classes/draw/interface/dcoor.c (revision 9895aa37ac365bac650f6bd8bf977519f7222510)
1 
2 /*
3        Provides the calling sequences for all the basic PetscDraw routines.
4 */
5 #include <petsc-private/drawimpl.h>  /*I "petscdraw.h" I*/
6 
7 #undef __FUNCT__
8 #define __FUNCT__ "PetscDrawSetCoordinates"
9 /*@
10    PetscDrawSetCoordinates - Sets the application coordinates of the corners of
11    the window (or page).
12 
13    Not collective
14 
15    Input Parameters:
16 +  draw - the drawing object
17 -  xl,yl,xr,yr - the coordinates of the lower left corner and upper
18                  right corner of the drawing region.
19 
20    Level: advanced
21 
22    Concepts: drawing^coordinates
23    Concepts: graphics^coordinates
24 
25 .seealso: PetscDrawGetCoordinates()
26 
27 @*/
28 PetscErrorCode  PetscDrawSetCoordinates(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr)
29 {
30   PetscErrorCode ierr;
31 
32   PetscFunctionBegin;
33   PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1);
34   draw->coor_xl = xl; draw->coor_yl = yl;
35   draw->coor_xr = xr; draw->coor_yr = yr;
36   if (draw->ops->setcoordinates) {
37     ierr = (*draw->ops->setcoordinates)(draw,xl,yl,xr,yr);CHKERRQ(ierr);
38   }
39   PetscFunctionReturn(0);
40 }
41 
42