Re: snap to grid vs. straight lines

On Thu, 31 Oct 2002, Martin Hans wrote:
Hi, I have not been able to find anything on this on bugzilla nor in the
archive of this list.

I use dia from today's cvs (took some time to make it compile).

When doing a diagram, for instance a flowchart, how do I get straight 
horizontal or vertical lines?

- if I turn the grid on, then the center connection points of the text
boxes don't match the grid lines because it is the upper left corner of
the box that snaps to grid and the width of the box is dependent on the
content of the box, not on the grid width.

- i could, of course, use the zig-zag line, but then the arrowheads end
up pointing along the side of the box.

- so instead it seems I have to turn off snap to grid and zoom in real
close to try to make the lines absolutely straight or get the arrowheads
on the zig-zag lines point in the right direction.

I've made some code that helps with this, but it hasn't been added to very
many objects yet.  Try taking two standard boxes (i.e. not from a sheet),
and make a zigzagline horizontally between them.  You should notice that
the orientation of the arrows changes when you connect it.  If you can do
simple C programming, you can extend this to more programmed elements.  I'm
unsure how to get it added to shapes.


Lars Clausen (| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]