15c6c1daeSBarry Smith 25c6c1daeSBarry Smith /* 35c6c1daeSBarry Smith Provides the calling sequences for all the basic Draw routines. 45c6c1daeSBarry Smith */ 5af0996ceSBarry 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 { 27*8f69470aSLisandro Dalcin PetscBool isnull; 285c6c1daeSBarry Smith PetscErrorCode ierr; 295c6c1daeSBarry Smith 305c6c1daeSBarry Smith PetscFunctionBegin; 315c6c1daeSBarry Smith PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID,1); 32*8f69470aSLisandro Dalcin ierr = PetscDrawIsNull(draw,&isnull);CHKERRQ(ierr); 33*8f69470aSLisandro Dalcin if (isnull) PetscFunctionReturn(0); 34*8f69470aSLisandro Dalcin if (!draw->ops->ellipse) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"No support for drawing ellipses"); 355c6c1daeSBarry Smith ierr = (*draw->ops->ellipse)(draw, x, y, a, b, c);CHKERRQ(ierr); 365c6c1daeSBarry Smith PetscFunctionReturn(0); 375c6c1daeSBarry Smith } 38