Actual source code: dcoor.c
2: /*
3: Provides the calling sequences for all the basic PetscDraw routines.
4: */
5: #include <petsc/private/drawimpl.h>
7: /*@
8: PetscDrawSetCoordinates - Sets the application coordinates of the corners of
9: the window (or page).
11: Not collective
13: Input Parameters:
14: + draw - the drawing object
15: - xl,yl,xr,yr - the coordinates of the lower left corner and upper
16: right corner of the drawing region.
18: Level: advanced
20: .seealso: PetscDrawGetCoordinates()
22: @*/
23: PetscErrorCode PetscDrawSetCoordinates(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr)
24: {
29: draw->coor_xl = xl; draw->coor_yl = yl;
30: draw->coor_xr = xr; draw->coor_yr = yr;
31: if (draw->ops->setcoordinates) {
32: (*draw->ops->setcoordinates)(draw,xl,yl,xr,yr);
33: }
34: return(0);
35: }
37: /*@
38: PetscDrawGetCoordinates - Gets the application coordinates of the corners of
39: the window (or page).
41: Not Collective
43: Input Parameter:
44: . draw - the drawing object
46: Level: advanced
48: Output Parameters:
49: + xl - the horizontal coordinate of the lower left corner of the drawing region.
50: . yl - the vertical coordinate of the lower left corner of the drawing region.
51: . xr - the horizontal coordinate of the upper right corner of the drawing region.
52: - yr - the vertical coordinate of the upper right corner of the drawing region.
54: .seealso: PetscDrawSetCoordinates()
56: @*/
57: PetscErrorCode PetscDrawGetCoordinates(PetscDraw draw,PetscReal *xl,PetscReal *yl,PetscReal *xr,PetscReal *yr)
58: {
65: *xl = draw->coor_xl; *yl = draw->coor_yl;
66: *xr = draw->coor_xr; *yr = draw->coor_yr;
67: return(0);
68: }