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

Re: Question about layout plugins



Le Sun, Jun 02, 2002, à 04:37:32PM -0700, James Michael DuPont a écrit:
> Dear DIA Developers,
> 
> I would like to help create a Layout Plugin API, or
> use what is already existing. The API would allow for
> the adding in an configuring of various layout
> engines.  

You'd probably need to do something new.

> Can you please tell me where to start looking into
> this, I have identified some click and move and update
> handlers, but am interested in getting some input on
> where you think the best interface would be placed.

Basically, you need to access the lib/diagramdata.h:DiagramData structure
and the Layer structure, then you'll of course be interested in the
lib/object.h/Object structure (especially the position/bounding_box and the
handles and connections member fields and their supporting methods
(object_*() ). 

What would be nice for a plug-in API would be to write a couple functions in
lib/* to help a plug-in enumerate the layers and the objects in a layer (in
fact, filling the missing bits from lib/diagramdata.h to avoid the need for
a plug-in to enumerate directly in the DiagramData and Layer structures). 

> You can imagine various layout managers that you can
> turn off and on, and specifiy attributes on the node
> and link layer to handle. Springs, Gravity, Magnets,
> weights and even simulated annealling are different
> ways to do interesting layouts.

sounds cool...

> Also on this note, what are the possibilities of
> embedding hrefs in each object and exporting to jpg
> image maps? I am sure that someone has looked into or
> has done this already? 

These are two different features. First, for dia diagrams, you'd probably be
better off by esporting to PNG image maps... Then, adding a standard
property of type URL, and, why not, tying it to Object (this would require
bumping up the plugin API version which is fine for the time being), and
then find a way (renderer ?) to pass this URL to a PNG+ImageMap export
plug-in.
 

Have fun. Be aware that major core changes are in the works, though.

	-- Cyrille

-- 
Grumpf.




[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