2(c)PROGRAM:
#include
#include
#include
#include
#include
void main()
{
int gd=DETECT,gm;
int ch;
clrscr();
while(1)
{printf("******Ellipse 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);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 2:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(SOLID_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 3:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LINE_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 4:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LTSLASH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 5:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(SLASH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 6:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(BKSLASH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 7:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(LTBKSLASH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 8:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(HATCH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 9:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(XHATCH_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 10:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(INTERLEAVE_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 11:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(WIDE_DOT_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 12:clrscr();
initgraph(&gd,&gm," ");
setfillstyle(CLOSE_DOT_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();
closegraph();
break;
case 13:
clrscr();
initgraph(&gd,&gm," ");
setfillstyle(USER_FILL, RED);
ellipse(100, 100,0,360,50,25);
floodfill(100, 100, WHITE);
getch();
cleardevice();closegraph();
break;
case 14:
exit(0);
}
}
}
No comments:
Post a Comment