setlinestyle() function
Declaration of setlinestyle() function
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 of setlinestyle()
#include <graphics.h>
main()
{
int gd = DETECT, gm, c , x = 100, y = 50;
initgraph(&gd, &gm, "C:\\ TurboC3\\BGI");
for ( c = 0 ; c < 5 ; c++ )
{
setlinestyle(c, 0, 2);
line(x, y, x+200, y); y = y + 25;
}
getch(); closegraph(); return 0;
}