Date: 2021-03-03T22:25:35+00:00

Actual source code: dcoor.c
petsc-3.14.5 2021-03-03
Report Typos and Errors

      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

     21: .seealso: PetscDrawGetCoordinates()

     23: @*/
     24: PetscErrorCode  PetscDrawSetCoordinates(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr)
     25: {

     30:   draw->coor_xl = xl; draw->coor_yl = yl;
     31:   draw->coor_xr = xr; draw->coor_yr = yr;
     32:   if (draw->ops->setcoordinates) {
     33:     (*draw->ops->setcoordinates)(draw,xl,yl,xr,yr);
     34:   }
     35:   return(0);
     36: }

     38: /*@
     39:    PetscDrawGetCoordinates - Gets the application coordinates of the corners of
     40:    the window (or page).

     42:    Not Collective

     44:    Input Parameter:
     45: .  draw - the drawing object

     47:    Level: advanced

     49:    Ouput Parameters:
     50: .  xl,yl,xr,yr - the coordinates of the lower left corner and upper
     51:                  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: }