Actual source code: dellipse.c

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

  8: /*@
  9:   PetscDrawEllipse - Draws an ellipse onto a drawable.

 11:   Not collective

 13:   Input Parameters:
 14: + draw - The drawing context
 15: . x,y  - The center
 16: . a,b  - The major and minor axes lengths
 17: - c    - The color

 19:   Level: beginner

 21: .keywords: draw, ellipse
 22: .seealso: PetscDrawRectangle(), PetscDrawTriangle()
 23: @*/
 24: PetscErrorCode PetscDrawEllipse(PetscDraw draw, PetscReal x, PetscReal y, PetscReal a, PetscReal b, int c)
 25: {
 26:   PetscTruth isdrawnull;

 31:   PetscTypeCompare((PetscObject) draw, PETSC_DRAW_NULL, &isdrawnull);
 32:   if (isdrawnull) return(0);
 33:   (*draw->ops->ellipse)(draw, x, y, a, b, c);
 34:   return(0);
 35: }