You are here

setlinestyle in c

Declaration:
void setlinestyle( int linestyle, unsigned upattern, int thickness );

Available line styles:

enum line_styles 
{ 
   SOLID_LINE, 
   DOTTED_LINE, 
   CENTER_LINE, 
   DASHED_LINE, 
   USERBIT_LINE 
};

C programming code

#include <graphics.h>
 
main()
{
   int gd = DETECT, gm, c , x = 100, y = 50;
 
   initgraph(&gd, &gm, "C:\\TC\\BGI");
 
   for ( c = 0 ; c < 5 ; c++ )
   {
       setlinestyle(c, 0, 2);
 
       line(x, y, x+200, y);
       y = y + 25;
   }
 
   getch(); 
   closegraph();
   return 0;
}