Actual source code: drect.c

  1: /*$Id: drect.c,v 1.31 2001/03/23 23:20:08 balay Exp $*/
  2: /*
  3:        Provides the calling sequences for all the basic PetscDraw routines.
  4: */
 5:  #include src/sys/src/draw/drawimpl.h

  7: /*@
  8:    PetscDrawRectangle - PetscDraws a rectangle  onto a drawable.

 10:    Not Collective

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

 17:    Level: beginner

 19:    Concepts: drawing^rectangle
 20:    Concepts: graphics^rectangle
 21:    Concepts: rectangle

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