ellipse function of c graphics

C program to draw ellipse in c graphics
  • Syntax of ellipse is
    ellipse(int midx,int midy, int startingangle, int endingangle,int radiusx,int radiusy);
  • Ellipse is used to draw an elliptical arc.
  • Ellipse takes 6 arguments, all of the int type.
  • First two argument define the center of the ellipse to place on the screen.
  • Third and fourth argument are starting and ending angles of the ellipse.
  • Fifth argument is the radius of the ellipse in x axis and sixth argument is the radius of the ellipse in y axis.
C graphics program to draw ellipse.

#include <graphics.h>
#include <stdio.h>



int main( )
{
    int gd=DETECT, gm;
    initgraph(&gd,&gm,"C:\\tc\\bgi");

    ellipse(150,150,0,180,60,120);
    getch();
    closegraph();

    return 0;
}

ellipse function of c graphics

Download


0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.