Wednesday 6 November 2013

IMPLEMENTATION OF CIRCLE ATTRIBUTES in C Aglorithm | Computer Graphics Lab Manual | IT department | Final Year



2(b)PROGRAM:

#include
#include
#include
#include
#include
void main()
{
int gd=DETECT,gm;
int ch;
clrscr();
while(1)
{
printf("******Circle Attributes*******\n");
printf("\n1.Empty Fill");
printf("\n2.Soild Fill");
printf("\n3.Line Fill");
printf("\n4.LTSlash Fill");
printf("\n5.Slash Fill");
printf("\n6.BKSlash Fill");
printf("\n7.LTBKSlash Fill");
printf("\n8.Hatch Fill");
printf("\n9.Xhatch Fill");
printf("\n10.Interleave Fill");
printf("\n11.Wide dot Fill");
printf("\n12.close dot Fill");
printf("\n13.User Fill");
printf("\n14.Exit");
printf("\n\nEnter your choice:\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(EMPTY_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 2:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(SOLID_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 3:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LINE_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 4:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LTSLASH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 5:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(SLASH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 6:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(BKSLASH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 7:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LTBKSLASH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 8:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(HATCH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 9:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(XHATCH_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 10:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(INTERLEAVE_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();closegraph();
break;
case 11:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(WIDE_DOT_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();closegraph();
break;
case 12:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(CLOSE_DOT_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();closegraph();
break;
case 13:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(USER_FILL, RED);
circle(100, 100, 50);
floodfill(100, 100, WHITE);
getch();
cleardevice();closegraph();
break;
case 14:
exit(0);
}
}

}




No comments:

Don't You Think this Awesome Post should be shared ??
| IMPLEMENTATION OF CIRCLE ATTRIBUTES in C Aglorithm | Computer Graphics Lab Manual | IT department | Final Year |
Back To Top Related Posts Plugin for WordPress, Blogger...