Draw lines using C. Please HELP!

Status
Not open for further replies.

c_beginer

Newbie level 1
Joined
Apr 11, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
I want to draw lines and boxes using C language that run under DOS without active graphic-mode from BIOS. Please help. Source code would be helpful. Thanx
c_beginer
 

With out graphics mode active you can not draw sharp lines. If you do not like use bios you should use grpahics library (graphics.h). In text mode it is only posible like to draw lines using ASCII characters.

Code:
  void draw_line(int ch)
  {
      int i;
      printf("%c", '\n');
      for(i = 0; i < 80; i++)
         printf("%c", ch);
      printf("%c", '\n');

      /* printf can be replaced by putch and putchar */
  }

Hope that is the intention.

Cheers
idlebrain
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…