1*5c6c1daeSBarry Smith 2*5c6c1daeSBarry Smith /* 3*5c6c1daeSBarry Smith Provides the calling sequences for all the basic Draw routines. 4*5c6c1daeSBarry Smith */ 5*5c6c1daeSBarry Smith #include <petsc-private/drawimpl.h> /*I "petscdraw.h" I*/ 6*5c6c1daeSBarry Smith 7*5c6c1daeSBarry Smith #undef __FUNCT__ 8*5c6c1daeSBarry Smith #define __FUNCT__ "PetscDrawEllipse" 9*5c6c1daeSBarry Smith /*@ 10*5c6c1daeSBarry Smith PetscDrawEllipse - Draws an ellipse onto a drawable. 11*5c6c1daeSBarry Smith 12*5c6c1daeSBarry Smith Not collective 13*5c6c1daeSBarry Smith 14*5c6c1daeSBarry Smith Input Parameters: 15*5c6c1daeSBarry Smith + draw - The drawing context 16*5c6c1daeSBarry Smith . x,y - The center 17*5c6c1daeSBarry Smith . a,b - The major and minor axes lengths 18*5c6c1daeSBarry Smith - c - The color 19*5c6c1daeSBarry Smith 20*5c6c1daeSBarry Smith Level: beginner 21*5c6c1daeSBarry Smith 22*5c6c1daeSBarry Smith .keywords: draw, ellipse 23*5c6c1daeSBarry Smith .seealso: PetscDrawRectangle(), PetscDrawTriangle() 24*5c6c1daeSBarry Smith @*/ 25*5c6c1daeSBarry Smith PetscErrorCode PetscDrawEllipse(PetscDraw draw, PetscReal x, PetscReal y, PetscReal a, PetscReal b, int c) 26*5c6c1daeSBarry Smith { 27*5c6c1daeSBarry Smith PetscBool isdrawnull; 28*5c6c1daeSBarry Smith PetscErrorCode ierr; 29*5c6c1daeSBarry Smith 30*5c6c1daeSBarry Smith PetscFunctionBegin; 31*5c6c1daeSBarry Smith PetscValidHeaderSpecific(draw, PETSC_DRAW_CLASSID,1); 32*5c6c1daeSBarry Smith ierr = PetscObjectTypeCompare((PetscObject) draw, PETSC_DRAW_NULL, &isdrawnull);CHKERRQ(ierr); 33*5c6c1daeSBarry Smith if (isdrawnull) PetscFunctionReturn(0); 34*5c6c1daeSBarry Smith ierr = (*draw->ops->ellipse)(draw, x, y, a, b, c);CHKERRQ(ierr); 35*5c6c1daeSBarry Smith PetscFunctionReturn(0); 36*5c6c1daeSBarry Smith } 37