Re: First SVG graphic
От | Peter Eisentraut |
---|---|
Тема | Re: First SVG graphic |
Дата | |
Msg-id | c2d9a262-0f9d-8c76-b011-bdf3acfc60e3@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: First SVG graphic (Jürgen Purtz <juergen@purtz.de>) |
Ответы |
Re: First SVG graphic
Re: First SVG graphic |
Список | pgsql-docs |
I played with this further. My conclusion is that SVG as a source format is not workable. Aside from the tooling issues that are being discussed, which might be solvable, I think it's not the right level of abstraction. The problem is that it is a *vector* format, but not a *graph* or *chart* format. You can draw boxes and lines and text, but nothing in the format indicates how they are connected. You can see that in the provided example graphs: The alignment of the arrow tips to the boxes and the text in the boxes is not pixel-perfect. If you open this in Inkscape and move a box around, the edges don't move with it. The final appearance of the picture is subject to how shaky the hand holding the mouse was. ;-) I suppose experienced graphics artists have ways to deal with that, but they are not in evidence here. I'm thinking of someone, say, adding a tweak to the GIN code and wanting to update the image, and I don't see that as being pleasant. I looked at some alternatives. I rebuilt the GIN image using Graphviz and the page layout image using Ditaa. See attached patch. The results look fine and useful to me. I would be much more comfortable using those tools: They use a higher level of abstraction, so an author can focus on the logical structure of the image and not the pixel details. The source formats are easily diffable. Both can convert to SVG, so the rest of the tooling can still be used. (I didn't find the pg_dump image all that useful, so I didn't do anything with it here. But I think it could be done using either Ditaa or Graphviz.) Using SVG as an output format looks good. It works in HTML, PDF, and EPUB. I did some tweaks to your tooling so that the images scale automatically in the PDF output. Everything looks good, so I would be happy to proceed in this direction. (We can have some discussion about whether we want to commit the intermediate SVG files and what the directory layout should be etc. I didn't bother with that in my patch yet.) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Вложения
В списке pgsql-docs по дате отправления: