Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Draw lines using C. Please HELP!

Status
Not open for further replies.

c_beginer

Newbie level 1
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top