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 205c6c1daeSBarry Smith .seealso: PetscDrawGetCoordinates() 215c6c1daeSBarry Smith 225c6c1daeSBarry Smith @*/ 235c6c1daeSBarry Smith PetscErrorCode PetscDrawSetCoordinates(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr) 245c6c1daeSBarry Smith { 255c6c1daeSBarry Smith PetscErrorCode ierr; 265c6c1daeSBarry Smith 275c6c1daeSBarry Smith PetscFunctionBegin; 285c6c1daeSBarry Smith PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 295c6c1daeSBarry Smith draw->coor_xl = xl; draw->coor_yl = yl; 305c6c1daeSBarry Smith draw->coor_xr = xr; draw->coor_yr = yr; 315c6c1daeSBarry Smith if (draw->ops->setcoordinates) { 325c6c1daeSBarry Smith ierr = (*draw->ops->setcoordinates)(draw,xl,yl,xr,yr);CHKERRQ(ierr); 335c6c1daeSBarry Smith } 345c6c1daeSBarry Smith PetscFunctionReturn(0); 355c6c1daeSBarry Smith } 365c6c1daeSBarry Smith 378f69470aSLisandro Dalcin /*@ 388f69470aSLisandro Dalcin PetscDrawGetCoordinates - Gets the application coordinates of the corners of 398f69470aSLisandro Dalcin the window (or page). 408f69470aSLisandro Dalcin 418f69470aSLisandro Dalcin Not Collective 428f69470aSLisandro Dalcin 438f69470aSLisandro Dalcin Input Parameter: 448f69470aSLisandro Dalcin . draw - the drawing object 458f69470aSLisandro Dalcin 468f69470aSLisandro Dalcin Level: advanced 478f69470aSLisandro Dalcin 4801d2d390SJose E. Roman Output Parameters: 49*6b867d5aSJose E. Roman + xl - the horizontal coordinate of the lower left corner of the drawing region. 50*6b867d5aSJose E. Roman . yl - the vertical coordinate of the lower left corner of the drawing region. 51*6b867d5aSJose E. Roman . xr - the horizontal coordinate of the upper right corner of the drawing region. 52*6b867d5aSJose E. Roman - yr - the vertical coordinate of the upper right corner of the drawing region. 538f69470aSLisandro Dalcin 548f69470aSLisandro Dalcin .seealso: PetscDrawSetCoordinates() 558f69470aSLisandro Dalcin 568f69470aSLisandro Dalcin @*/ 578f69470aSLisandro Dalcin PetscErrorCode PetscDrawGetCoordinates(PetscDraw draw,PetscReal *xl,PetscReal *yl,PetscReal *xr,PetscReal *yr) 588f69470aSLisandro Dalcin { 598f69470aSLisandro Dalcin PetscFunctionBegin; 608f69470aSLisandro Dalcin PetscValidHeaderSpecific(draw,PETSC_DRAW_CLASSID,1); 618f69470aSLisandro Dalcin PetscValidRealPointer(xl,2); 628f69470aSLisandro Dalcin PetscValidRealPointer(yl,3); 638f69470aSLisandro Dalcin PetscValidRealPointer(xr,4); 648f69470aSLisandro Dalcin PetscValidRealPointer(yr,5); 658f69470aSLisandro Dalcin *xl = draw->coor_xl; *yl = draw->coor_yl; 668f69470aSLisandro Dalcin *xr = draw->coor_xr; *yr = draw->coor_yr; 678f69470aSLisandro Dalcin PetscFunctionReturn(0); 688f69470aSLisandro Dalcin } 69