Specialized rendering (was Re: Feature request)



At 13.01.2011 17:18, Max Wahler wrote:
> [...]
My problem now is, that the generated SVG is pretty nice, but there's no
possibility to give the UML elements identifiers that themselves become
id attributes of the generated SVG group tags.
Not sure if I understand, but sounds like part of this could be possible with some recent and not so recent additions. With
        http://git.gnome.org/browse/dia/commit/?id=3cf5a40
it is possible to interweave meta information from the object level with drawing information.

There also is a meta info property editor for most objects (unfortunately not yet for complex objects - e.g. UML-Class - which bring their own property editing. See:
        http://git.gnome.org/browse/dia/tree/NEWS?id=3cf5a40#n5

That'd allow me to simply
put the results of the tests in a CSS that color the UML elements by
naming them like the element identifiers.

What's the element identifier? If you refer to e.g. the name property of the UML-Class object, than the above may work. But if you are refering to the id used in the diagram file, please read:
http://mail.gnome.org/archives/dia-list/2009-December/msg00007.html

Since my C(++) skills are not very good I'd love to see someone
implement that feature in Dia!

Depending on which SVG exporter you are using C skills are not necessary.
There are three of them:
  SVG(cairo) - probably the best visual quality and most complex SVG,
               generation is done by the respective cairo backend.
               Text is converted to outlines.
  SVG(C)- named "Scalable Vector Graphics" - based on Dia's built-in
          SvgRenderer also used for shape export
  SVG(py) - named "SVG plain" - implemented as Python-Dia plug-in should be
            easy enough to modify

Another option could be to split the rendering and the meta information generation in two separate plug-ins like I've tried to show with the html image map plug-in:
http://git.gnome.org/browse/dia/tree/plug-ins/python/imgmap.py

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



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