15c6c1daeSBarry Smith 25c6c1daeSBarry Smith /* 35c6c1daeSBarry Smith Provides the calling sequences for all the basic PetscDraw routines. 45c6c1daeSBarry Smith */ 5af0996ceSBarry Smith #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/ 65c6c1daeSBarry Smith 75c6c1daeSBarry Smith /*@ 85c6c1daeSBarry Smith PetscDrawSetCoordinates - Sets the application coordinates of the corners of 95c6c1daeSBarry Smith the window (or page). 105c6c1daeSBarry Smith 115c6c1daeSBarry Smith Not collective 125c6c1daeSBarry Smith 135c6c1daeSBarry Smith Input Parameters: 145c6c1daeSBarry Smith + draw - the drawing object 155c6c1daeSBarry Smith - xl,yl,xr,yr - the coordinates of the lower left corner and upper 165c6c1daeSBarry Smith right corner of the drawing region. 175c6c1daeSBarry Smith 185c6c1daeSBarry Smith Level: advanced 195c6c1daeSBarry Smith 20*811af0c4SBarry Smith .seealso: `PetscDraw`, `PetscDrawGetCoordinates()` 215c6c1daeSBarry Smith @*/ 229371c9d4SSatish Balay PetscErrorCode PetscDrawSetCoordinates(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal yr) { 235c6c1daeSBarry Smith PetscFunctionBegin; 245c6c1daeSBarry Smith PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1); 259371c9d4SSatish Balay draw->coor_xl = xl; 269371c9d4SSatish Balay draw->coor_yl = yl; 279371c9d4SSatish Balay draw->coor_xr = xr; 289371c9d4SSatish Balay draw->coor_yr = yr; 29dbbe0bcdSBarry Smith PetscTryTypeMethod(draw, setcoordinates, xl, yl, xr, yr); 305c6c1daeSBarry Smith PetscFunctionReturn(0); 315c6c1daeSBarry Smith } 325c6c1daeSBarry Smith 338f69470aSLisandro Dalcin /*@ 348f69470aSLisandro Dalcin PetscDrawGetCoordinates - Gets the application coordinates of the corners of 358f69470aSLisandro Dalcin the window (or page). 368f69470aSLisandro Dalcin 378f69470aSLisandro Dalcin Not Collective 388f69470aSLisandro Dalcin 398f69470aSLisandro Dalcin Input Parameter: 408f69470aSLisandro Dalcin . draw - the drawing object 418f69470aSLisandro Dalcin 428f69470aSLisandro Dalcin Level: advanced 438f69470aSLisandro Dalcin 4401d2d390SJose E. Roman Output Parameters: 456b867d5aSJose E. Roman + xl - the horizontal coordinate of the lower left corner of the drawing region. 466b867d5aSJose E. Roman . yl - the vertical coordinate of the lower left corner of the drawing region. 476b867d5aSJose E. Roman . xr - the horizontal coordinate of the upper right corner of the drawing region. 486b867d5aSJose E. Roman - yr - the vertical coordinate of the upper right corner of the drawing region. 498f69470aSLisandro Dalcin 50*811af0c4SBarry Smith .seealso: `PetscDraw`, `PetscDrawSetCoordinates()` 518f69470aSLisandro Dalcin @*/ 529371c9d4SSatish Balay PetscErrorCode PetscDrawGetCoordinates(PetscDraw draw, PetscReal *xl, PetscReal *yl, PetscReal *xr, PetscReal *yr) { 538f69470aSLisandro Dalcin PetscFunctionBegin; 548f69470aSLisandro Dalcin PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1); 558f69470aSLisandro Dalcin PetscValidRealPointer(xl, 2); 568f69470aSLisandro Dalcin PetscValidRealPointer(yl, 3); 578f69470aSLisandro Dalcin PetscValidRealPointer(xr, 4); 588f69470aSLisandro Dalcin PetscValidRealPointer(yr, 5); 599371c9d4SSatish Balay *xl = draw->coor_xl; 609371c9d4SSatish Balay *yl = draw->coor_yl; 619371c9d4SSatish Balay *xr = draw->coor_xr; 629371c9d4SSatish Balay *yr = draw->coor_yr; 638f69470aSLisandro Dalcin PetscFunctionReturn(0); 648f69470aSLisandro Dalcin } 65