15c6c1daeSBarry Smith /*
25c6c1daeSBarry Smith Provides the calling sequences for all the basic PetscDraw routines.
35c6c1daeSBarry Smith */
4af0996ceSBarry Smith #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/
55c6c1daeSBarry Smith
65c6c1daeSBarry Smith /*@
75c6c1daeSBarry Smith PetscDrawSetCoordinates - Sets the application coordinates of the corners of
85c6c1daeSBarry Smith the window (or page).
95c6c1daeSBarry Smith
1020f4b53cSBarry Smith Not Collective
115c6c1daeSBarry Smith
125c6c1daeSBarry Smith Input Parameters:
135c6c1daeSBarry Smith + draw - the drawing object
1410450e9eSJacob Faibussowitsch . xl - the lower left x coordinate
1510450e9eSJacob Faibussowitsch . yl - the lower left y coordinate
1610450e9eSJacob Faibussowitsch . xr - the upper right x coordinate
1710450e9eSJacob Faibussowitsch - yr - the upper right y coordinate
185c6c1daeSBarry Smith
195c6c1daeSBarry Smith Level: advanced
205c6c1daeSBarry Smith
21811af0c4SBarry Smith .seealso: `PetscDraw`, `PetscDrawGetCoordinates()`
225c6c1daeSBarry Smith @*/
PetscDrawSetCoordinates(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr)23d71ae5a4SJacob Faibussowitsch PetscErrorCode PetscDrawSetCoordinates(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal yr)
24d71ae5a4SJacob Faibussowitsch {
255c6c1daeSBarry Smith PetscFunctionBegin;
265c6c1daeSBarry Smith PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
279371c9d4SSatish Balay draw->coor_xl = xl;
289371c9d4SSatish Balay draw->coor_yl = yl;
299371c9d4SSatish Balay draw->coor_xr = xr;
309371c9d4SSatish Balay draw->coor_yr = yr;
31dbbe0bcdSBarry Smith PetscTryTypeMethod(draw, setcoordinates, xl, yl, xr, yr);
323ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
335c6c1daeSBarry Smith }
345c6c1daeSBarry Smith
358f69470aSLisandro Dalcin /*@
368f69470aSLisandro Dalcin PetscDrawGetCoordinates - Gets the application coordinates of the corners of
378f69470aSLisandro Dalcin the window (or page).
388f69470aSLisandro Dalcin
398f69470aSLisandro Dalcin Not Collective
408f69470aSLisandro Dalcin
418f69470aSLisandro Dalcin Input Parameter:
428f69470aSLisandro Dalcin . draw - the drawing object
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
5020f4b53cSBarry Smith Level: advanced
5120f4b53cSBarry Smith
52811af0c4SBarry Smith .seealso: `PetscDraw`, `PetscDrawSetCoordinates()`
538f69470aSLisandro Dalcin @*/
PetscDrawGetCoordinates(PetscDraw draw,PetscReal * xl,PetscReal * yl,PetscReal * xr,PetscReal * yr)54d71ae5a4SJacob Faibussowitsch PetscErrorCode PetscDrawGetCoordinates(PetscDraw draw, PetscReal *xl, PetscReal *yl, PetscReal *xr, PetscReal *yr)
55d71ae5a4SJacob Faibussowitsch {
568f69470aSLisandro Dalcin PetscFunctionBegin;
578f69470aSLisandro Dalcin PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID, 1);
58*4f572ea9SToby Isaac PetscAssertPointer(xl, 2);
59*4f572ea9SToby Isaac PetscAssertPointer(yl, 3);
60*4f572ea9SToby Isaac PetscAssertPointer(xr, 4);
61*4f572ea9SToby Isaac PetscAssertPointer(yr, 5);
629371c9d4SSatish Balay *xl = draw->coor_xl;
639371c9d4SSatish Balay *yl = draw->coor_yl;
649371c9d4SSatish Balay *xr = draw->coor_xr;
659371c9d4SSatish Balay *yr = draw->coor_yr;
663ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
678f69470aSLisandro Dalcin }
68