fillellipse

Overview :

This function is used to draw an ellipse in the graphics mode and then this ellipse is filled with the current color and fill pattern.

Syntax :
void fillellipse(int x,int y,int x_radius,int y_radius);
Description :

The "fillellipse" function accepts 4 parameters

  • x -> The x co-ordinate of the screen where the center of elliptical arc has to be drawn

  • y -> The y co-ordinate of the screen where the center of elliptical arc has to be drawn

  • xradius -> This parameter is used for giving x axis radius of the elliptical arc

  • yradius -> This parameter is used for giving y axis radius of the elliptical arc



"fillellipse" function does not return any value.
Example :
#include <graphics.h>
#include <stdio.h>
#include <conio.h>

int main()
{
    
   int gm,gd=DETECT;
   int x=320;
   int y=240;
   int x_radius=100,y_radius=30;
  
   initgraph(&gd,&gm,"C:\\turboc3\\bgi");
   setcolor(10);
   
   setfillstyle(LINE_FILL,2);
   fillellipse(x,y,x_radius,y_radius);
   
   getch();
   closegraph();
   return 0;
}


Comments

comments powered by Disqus