Actual source code: drect.c

  1: #define PETSC_DLL
  2: /*
  3:        Provides the calling sequences for all the basic PetscDraw routines.
  4: */
 5:  #include src/sys/draw/drawimpl.h

  9: /*@
 10:    PetscDrawRectangle - PetscDraws a rectangle  onto a drawable.

 12:    Not Collective

 14:    Input Parameters:
 15: +  draw - the drawing context
 16: .  xl,yl,xr,yr - the coordinates of the lower left, upper right corners
 17: -  c1,c2,c3,c4 - the colors of the four corners in counter clockwise order

 19:    Level: beginner

 21:    Concepts: drawing^rectangle
 22:    Concepts: graphics^rectangle
 23:    Concepts: rectangle

 25: @*/
 26: PetscErrorCode  PetscDrawRectangle(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr,int c1,int c2,int c3,int c4)
 27: {
 29:   PetscTruth isnull;
 32:   PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
 33:   if (isnull) return(0);
 34:   (*draw->ops->rectangle)(draw,xl,yl,xr,yr,c1,c2,c3,c4);
 35:   return(0);
 36: }