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

Re: drawing graphs with dia [PATCH]



Lars Clausen wrote:

On Mon, 2005-03-14 at 15:21 +0100, Grégoire Dooms wrote:


Hello,
Here is a context diff against CVS HEAD.
I implemented auto gap + absolute gap for lines and beziers.
It works like a charm (AFAIK :-).
I added the properties GUI (could be prettier).



Works nicely, indeed. Thank you very much for working on this! There's a few things I'd like to see changed, though.

Most importantly, the autogap feature should be dependent on which
connectionpoint you connect to -- it doesn't make a lot of sense unless
you're connected to a central connection point (a bit of sense, though,
but it looks weird). Making it depend on the CP will also remove those
options from the properties dialog, always a good thing.


Hmm. Not sure about this. I think compositionality is a good thing
and as this feature works regardless of the connection point, I'd like to be able to use it. On the other side if there is a connection point at the center of each object it's a good default and there shouldn't be use-cases where on would like to point to an other CP.


We'll then need a flag on CPs to say that they autogap (are interior).
I'm thinking the Element class should automatically add this.  For now,
we can just set it explicitly on the objects that have an interior CP.
Hmmm... CPs don't have flags as such yet, but they have the directions
4-bit which is kinda flaglike.  Nah, it's gotta be a new field flags.

For submitting patches, it'd be nice if you use the -u (unified) flag
and did not compress it (unless it's >40K large).



The only thing missing for a very nice way to output a graph from graphviz is the central connection point on the text object.

I also attach an example dia file.



The bezier autogap is significantly different from the line autogap, in
that it doesn't move the head around the object.


To move the head, move the second handle of the connected point. The auto-gap feature on bezier conserves the slope at the endpoint (this was my first proposition in a former mail). I chose this one after observing the behavior of bezier connected to an object when you drag the other point: they don't move around the connected point, they also conserve their slope.
In that sense the auto-gap feature conserves the behavior of the line/bez object when you move the other point.


I'd like to see the other simple lines (polyline, zigzagline in
particular) have gaps too.  And if the gap stuff is moved to the
Connection/Orthconn classes, it'll suddenly apply to a whole lot of
other objects.  See how autorouting is handled in OrthConn for examples
on how to do this.  But this is second priority, first is proper gap
defs for simple lines.



There are a few bugs left.
I'll handle them:
- The absolute end gap in the bezier has its sign interpreted the other way around
- Line and bezier miss the copy code so gaps are'nt copied they are reset to their defaults.


--
Grégoire Dooms



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK