Line Styles


#include <graphics.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
void main()
{
int gd=DETECT,gm;
int s;
char *lname[]={"SOLID LINE","DOTTED LINE","CENTER LINE",
 "DASHED LINE","USERBIT LINE"};
initgraph(&gd,&gm," ");
clrscr();
cleardevice();
printf("Line styles:");
for (s=0;s<5;s++)
{
   setlinestyle(s,1,3);
   line(100,30+s*50,250,250+s*50);
   outtextxy(255,250+s*50,lname[s]);
}
getch();
closegraph();
}

Popular posts from this blog

Simple Animation Using C

Personal Diary - A Mini Project Written in Turbo C With Graphical Interface

2D Reflection