Re: bounding points for boxes etc.



On 2 Sep 2003, avp cad ru wrote:
Lars Clausen ÐÐÑÐÑ:
On 2 Sep 2003, avp cad ru wrote:

Almost every shape in Dia has connection points that allow a user to
bound these shapes to other ones via lines, curves etc. But there's a
strict amount of such points. Is there an easy way to change this
amount?
No.  We have discussed various solutions, but it's tricky.  It has to be
done in a way consistent with each object, and in such a way that saved
diagrams work correctly.  If we just added connection points at
user-defined places, they wouldn't move the right way when the object
changes shape.  There's some work on allowing a 'gap' at the start and
end of a line, which could allow the whole object to act as a
connectionpoint, but that's future music.

What if connection points are added in user defined (and thus fixed)
points, and Dia calculates percentage of each connection point's
position and resizes sides keeping ratio taken from that percentage
info?

E.g.:

1      2     3   4        5
*------*-----*---*--------*
0      30    50  60       100

goes to... (by ratio ~1.5)


1         2        3     4            5
*---------*--------*-----*------------*
0         30       50    60           100

That makes sense in most cases, but sometimes the object doesn't scale in a
linear fashion.  See for example the UML Component, the two extra block
don't change size when the whole thing is resized.

Another way would be calculating equal distance between connection
points after adding/removing a connection point.

E.g.:

*-------*-------*

You add 1 connection point. Dia reaaranges distances and therre it goes:

*----*----*-----*

Add 1 more:

*---*---*---*---*

Of course here pops up the first problem: how to handle one side of a
box apart of other ones.

Yes, that makes that solution difficult.  Most objects just have a
scattering of connectionpoints (not even always in order around the object)
rather than a distribution of them.

I'd much rather have a system where you can connect to the middle with a
gap, and then keep the old connection points as guides to where it'd be
pretty to have connections.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| 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]