GNOME Bugzilla – Bug 735493
Attached Dia file exported to SVG doesn't look the same
Last modified: 2014-08-27 11:53:02 UTC
Created attachment 284571 [details] d.dia Downstream report: https://bugs.launchpad.net/ubuntu/+source/dia/+bug/948251 1) lsb_release -rd Description: Ubuntu 14.04.1 LTS Release: 14.04 2) apt-cache policy dia dia: Installed: 0.97.2-15ubuntu1 Candidate: 0.97.2-15ubuntu1 Version table: *** 0.97.2-15ubuntu1 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 100 /var/lib/dpkg/status 3) What is expected to happen via a terminal: cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/dia/+bug/948251/+attachment/4187893/+files/d.dia && dia --nosplash d.dia File > Export > Determine file type: Cairo Scalable Vector Graphic (*.svg) > Save > open exported file in Dia and it looks exactly the same. 4) What happens instead is it doesn't.
SVG round-trip trhough cairo SVG rendering was an interesting quest already tackled in the development version. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=108502#c18 or search for round-trip in the commit log, e.g. https://git.gnome.org/browse/dia/commit/?id=1c40554e6b7059987576689b5034f640cf291762 . IMO it's severity is hardly major, though. If you are interested in SVG export for further diagramming you should use the non-cairo SVG exporter (because it is keeping text as text). Round-trip already works with it for dia-0.97.x for the given example. BTW: if you now load the SVG with the development version and it does not look the same, please swich to anti-alaised rendering (with cairo). The old GDK based displayed renderer only has limited support for fancy things like path with holes or transparency.
Hans Breuer, thanks for the fast response. >"SVG round-trip trhough cairo SVG rendering was an interesting quest already tackled in the development version. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=108502#c18 or search for round-trip in the commit log, e.g. https://git.gnome.org/browse/dia/commit /?id=1c40554e6b7059987576689b5034f640cf291762 ." As I'm not terribly familiar with where Ubuntu's packaged version 0.97.2-15ubuntu1 would fall on this commit, would you be able to comment to if this is currently packaged in it? >"IMO it's severity is hardly major, though." Fair enough. I was simply going by the severity as defined in https://bugzilla.gnome.org/page.cgi?id=fields.html#bug_severity : "Major ... data output extremely incorrect" In this case, the data output is extremely incorrect. Despite this, would the Dia project have it's own definition of Severity bug reporters could reference that would be more accurate? >"If you are interested in SVG export for further diagramming you should use the non-cairo SVG exporter (because it is keeping text as text). Round-trip already works with it for dia-0.97.x for the given example." Just exported, via Scalable Vector Graphics (*.svg) and reopened, and looks exactly the same. >"BTW: if you now load the SVG with the development version and it does not look the same, please swich to anti-alaised rendering (with cairo). The old GDK based displayed renderer only has limited support for fancy things like path with holes or transparency." Would this be limited support, in that there is a technical limitation that would forever prevent it, or the export option doesn't currently have the code in place to support it?
(In reply to comment #2) > As I'm not terribly familiar with where Ubuntu's packaged version > 0.97.2-15ubuntu1 would fall on this commit, would you be able to comment to if > this is currently packaged in it? > It's not included with 0.97.2, but it will be with 0.98 whenever that gets released. (I'm using Bugzilla's target milestone field for the lowest release version which will include the fix.) > "Major ... data output extremely incorrect" > The data _output_ should not be checked with Dia but another importer, for SVG any decent browser. > In this case, the data output is extremely incorrect. No, it's Dia's SVG import which is (was) severly limited. See bug 108502 > Despite this, would the > Dia project have it's own definition of Severity bug reporters could reference > that would be more accurate? > Not at all. My classification is minor for the above mentioned reason and becuase there is an easy work-around. > >"BTW: if you now load the SVG with the development version and it does not look > the same, please swich to anti-alaised rendering (with cairo). The old GDK > based displayed renderer only has limited support for fancy things like path > with holes or transparency." > > Would this be limited support, in that there is a technical limitation that > would forever prevent it, or the export option doesn't currently have the code > in place to support it? It has nothing to do with the export, nor the import. The GDK rendering facility with Dia is limited by GDK drawing capabilities. Given that GDK drawing API is now deprecated in favor of cairo the DiaGdkRenderer will probably stay limited, too.