xref: /petsc/src/sys/classes/draw/interface/dellipse.c (revision af0996ce37bc06907c37d8d91773840993d61e62)
15c6c1daeSBarry Smith 
25c6c1daeSBarry Smith /*
35c6c1daeSBarry Smith        Provides the calling sequences for all the basic Draw routines.
45c6c1daeSBarry Smith */
5*af0996ceSBarry Smith #include <petsc/private/drawimpl.h>  /*I "petscdraw.h" I*/
65c6c1daeSBarry Smith 
75c6c1daeSBarry Smith #undef __FUNCT__
85c6c1daeSBarry Smith #define __FUNCT__ "PetscDrawEllipse"
95c6c1daeSBarry Smith /*@
105c6c1daeSBarry Smith   PetscDrawEllipse - Draws an ellipse onto a drawable.
115c6c1daeSBarry Smith 
125c6c1daeSBarry Smith   Not collective
135c6c1daeSBarry Smith 
145c6c1daeSBarry Smith   Input Parameters:
155c6c1daeSBarry Smith + draw - The drawing context
165c6c1daeSBarry Smith . x,y  - The center
175c6c1daeSBarry Smith . a,b  - The major and minor axes lengths
185c6c1daeSBarry Smith - c    - The color
195c6c1daeSBarry Smith 
205c6c1daeSBarry Smith   Level: beginner
215c6c1daeSBarry Smith 
225c6c1daeSBarry Smith .keywords: draw, ellipse
235c6c1daeSBarry Smith .seealso: PetscDrawRectangle(), PetscDrawTriangle()
245c6c1daeSBarry Smith @*/
255c6c1daeSBarry Smith PetscErrorCode  PetscDrawEllipse(PetscDraw draw, PetscReal x, PetscReal y, PetscReal a, PetscReal b, int c)
265c6c1daeSBarry Smith {
275c6c1daeSBarry Smith   PetscBool      isdrawnull;
285c6c1daeSBarry Smith   PetscErrorCode ierr;
295c6c1daeSBarry Smith 
305c6c1daeSBarry Smith   PetscFunctionBegin;
315c6c1daeSBarry Smith   PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID,1);
325c6c1daeSBarry Smith   ierr = PetscObjectTypeCompare((PetscObject) draw, PETSC_DRAW_NULL, &isdrawnull);CHKERRQ(ierr);
335c6c1daeSBarry Smith   if (isdrawnull) PetscFunctionReturn(0);
345c6c1daeSBarry Smith   ierr = (*draw->ops->ellipse)(draw, x, y, a, b, c);CHKERRQ(ierr);
355c6c1daeSBarry Smith   PetscFunctionReturn(0);
365c6c1daeSBarry Smith }
37