1. Line drawing

Thanks to a lot of help, my binary tree program is now working very nicely. It may be guilding the lily, (and is certainly unnecessary), but the display would be easier for others to understand if there were diagonal lines drawn on the screen between various points. I have done manual searches for:
lines
draw lines
drawing
graphics

Do I need some kind of C functions to do this? I used them successfully years ago.

new topic     » topic index » view message » categorize

2. Re: Line drawing

Hi

Assuming you are using text mode, you kind of have to make them up using what you have.

Youc should have a program in the demo folder of your eu installation called ascii.exu - run this and see what you can use from there. See http://www.asciitable.com/

Note, you can plece these characters on your screen using puts(1, 193), where 193 represents the ascii character you want to output.

If you want more intricate line drawing then you have to use an older version of eu which changed the consoles mode to allow point and line drawing, or use one of the graphics libraries (sdl or Allegro) to draw it and output text to the right places.

Hope this helps

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Line drawing

Thanks, Chris. The truth is that long horizontal lines (series of underscores) and short vertical lines (|) will probably work at least as well.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Line drawing

You may be able to do what you want with existing characters: look, for example, for a program called Character Map on your computer, and choose Greek script. It has characters like these: 𝈼 𝈻 𝈺 𝈩 𝈪 𝈫 which could be put together to give you some connecting lines. Be sure your gnome-terminal is set to UTF-8 under the Compatibility tab so it can display these.

To get the characters into your program, just copy and paste with the mouse.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Line drawing

Uh-huh!
Thanks. Position and puts of underlines and vertical bars has served very well.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu