Actual source code: drect.c
1: /*
2: Provides the calling sequences for all the basic PetscDraw routines.
3: */
4: #include src/sys/src/draw/drawimpl.h
8: /*@
9: PetscDrawRectangle - PetscDraws a rectangle onto a drawable.
11: Not Collective
13: Input Parameters:
14: + draw - the drawing context
15: . xl,yl,xr,yr - the coordinates of the lower left, upper right corners
16: - c1,c2,c3,c4 - the colors of the four corners in counter clockwise order
18: Level: beginner
20: Concepts: drawing^rectangle
21: Concepts: graphics^rectangle
22: Concepts: rectangle
24: @*/
25: PetscErrorCode PetscDrawRectangle(PetscDraw draw,PetscReal xl,PetscReal yl,PetscReal xr,PetscReal yr,int c1,int c2,int c3,int c4)
26: {
28: PetscTruth isnull;
31: PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
32: if (isnull) return(0);
33: (*draw->ops->rectangle)(draw,xl,yl,xr,yr,c1,c2,c3,c4);
34: return(0);
35: }