arc function of c graphics

C program to draw Arc in C Graphics.
  • Syntax of arc in c graphics is arc(int x, int y, int starting-angle,int ending-angle, int radius);.
  • Arc is used to draw circular arc.
  • It takes 5 arguments, all of the int type.
  • First two arguments define the center of the arc to place on the screen.
  • Third and fourth arguments are starting and ending angles of the arc.
  • Fifth argument is the radius of the arc in pixels.

C program to draw arc in c graphics

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



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

    arc(150,150,90,270,80);
    getch();
    closegraph();

    return 0;
}


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.