Author Topic: Problems with the "draw" macro.  (Read 1458 times)

Mike M

  • Community Member
  • Posts: 15
  • Hero Points: 2
Problems with the "draw" macro.
« on: October 23, 2015, 11:09:23 pm »
Use the draw macro as follows:
command = draw a

Try to draw this box in a clockwise direction:

   *---------*
   |         |
   |         |
   |         |
   *---------*

When you retrace it a second time you get this:

   *---------*
   |         +
   |         +
   |         +
   *---------*

Do the same thing in a counter clockwise direction
And you end up with this:

   *---------*
   +         |
   +         |
   +         |
   *---------*

Try to make two intersecting boxes.
It should look like this:

      *---------------*
      |               |
      |               |
      |     *---------*-----*
      |     |         |     |
      |     |         |     |
      *-----*---------*     |
            |               |
            |               |
            *---------------*

But instead looks like this:

      *---------------*
      |               |
      |     *---------------*
      |     |         |     |
      |     |         |     |
      |     |         |     |
      *-----|---------*     |
            |               |
            |               |
            *---------------*
 
The box you draw last overwrites the box on you draw first.
The intersections do not work.
 
Plus I really like to use a "+" character for corners and intersections instead of an asterisk. I think it looks a lot better. But it is easy enough to update the draw.e macro myself and either change the asterisks or add another case.

I know that nobody is going to retrace a box, and this might seem like a corner case, but you have to retrace parts of the box when making simple tables similar to the following. 

+----------+----------------------+--------------------------------------------+
| Date     | Name                 | Comment                                    |
+----------+----------------------+--------------------------------------------+
|          |                      |                                            |
|          |                      |                                            |
|          |                      |                                            |
+----------+----------------------+--------------------------------------------+

And it is currently not possible to do this without drawing it first and then manually going back and fixing the intersections.

If you retrace a box, it should not change the box. You should get the exact same box regardless of what characters you are overwriting.


rgloden

  • Senior Community Member
  • Posts: 163
  • Hero Points: 5
Re: Problems with the "draw" macro.
« Reply #1 on: October 25, 2015, 06:56:55 pm »
Another hidden gem.

  • I haven't installed Beta yet but playing with the "box" command in V19 uses strange chars when using parameter values 1-4 on Windows 7 64-bit.
  • The "a" parameter wasn't documented in the online help.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: Problems with the "draw" macro.
« Reply #2 on: October 26, 2015, 05:02:08 pm »
Here is an example of what rgloden is talking about. I used "draw 1" command to create this box.

Mike M

  • Community Member
  • Posts: 15
  • Hero Points: 2
Re: Problems with the "draw" macro.
« Reply #3 on: October 26, 2015, 05:37:10 pm »
The draw macro takes one argument which specifies which characters you want to use for horizontal and vertical lines as well as intersections and corners. You can also use gui-draw to specify the argument from a radio button.

On the GUI, you can select single lines, double lines, horizontal double line, vertical double line, ASCII characters, or blank spaces.

The help text for the draw function says:
1   Single line top/bottom sides and left/right sides.
2   Double line top/bottom sides and left/right sides.
3   Single line sides and double line top/bottom sides.
4   Double line sides and single line top/bottom sides.
B   Draw with blank character.  Used to erase drawing.
Any character  Any character may be used as the draw character.

The A parameter is not mentioned.

For modes 1 to 4, you have to be using the OEM Fixed Font or another font that supports DOS character graphics, otherwise other characters will be displayed that don't make sense.

I also found that if I'm using the OEM Fixed Font with single lines, it seems to works perfect. It doesn't write intersection symbols on the sides of a simple box when retracing and the intersections work.

However, if I keep pressing Cursor Down on the last line of the document, the line alternates between the vertical line-draw character and a question mark, like follows:

|
?
|
?
|

Mike M

  • Community Member
  • Posts: 15
  • Hero Points: 2
Re: Problems with the "draw" macro.
« Reply #4 on: October 26, 2015, 05:43:42 pm »
Another quick note: Hitting the Help button on the GUI draw dialog box doesn't do anything. And the title of the GUI draw dialog box is "vs" instead of something more descriptive like other GUI dialog box's.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: Problems with the "draw" macro.
« Reply #5 on: October 26, 2015, 06:00:52 pm »
I tried the OEM fixed font and that did work, although I also experienced the issues with the '?' showing up in some circumstances. Never when drawing in the up direction, but sometimes when drawing in the down direction.