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

Available line styles:

[pastacode lang=”c” manual=”enum%20line_styles%20%0A%7B%20%0A%20%20%20SOLID_LINE%2C%20%0A%20%20%20DOTTED_LINE%2C%20%0A%20%20%20CENTER_LINE%2C%20%0A%20%20%20DASHED_LINE%2C%20%0A%20%20%20USERBIT_LINE%20%0A%7D%3B” message=”” highlight=”” provider=”manual”/]

C programming code

[pastacode lang=”c” manual=”%23include%20%3Cgraphics.h%3E%0A%20%0Amain()%0A%7B%0A%20%20%20int%20gd%20%3D%20DETECT%2C%20gm%2C%20c%20%2C%20x%20%3D%20100%2C%20y%20%3D%2050%3B%0A%20%0A%20%20%20initgraph(%26gd%2C%20%26gm%2C%20%22C%3A%5C%5CTC%5C%5CBGI%22)%3B%0A%20%0A%20%20%20for%20(%20c%20%3D%200%20%3B%20c%20%3C%205%20%3B%20c%2B%2B%20)%0A%20%20%20%7B%0A%20%20%20%20%20%20%20setlinestyle(c%2C%200%2C%202)%3B%0A%20%0A%20%20%20%20%20%20%20line(x%2C%20y%2C%20x%2B200%2C%20y)%3B%0A%20%20%20%20%20%20%20y%20%3D%20y%20%2B%2025%3B%0A%20%20%20%7D%0A%20%0A%20%20%20getch()%3B%20%0A%20%20%20closegraph()%3B%0A%20%20%20return%200%3B%0A%7D” message=”” highlight=”” provider=”manual”/]

Categorized in: