Community
Participate
Working Groups
Created attachment 270751 [details] projectWithSVG.zip Currently, Batik version used by Sirius (and by GMF) is version 1.6.0 (04/11/2010). At least one bug exists with version 1.6.0 for Sirius that is probably fixed by version 1.7. The problem was discovered during analysis of bug 463051. The viewBox attribute [1] is not implemented by the Batik 1.6 (only implemented since 1.7 [2]). So all SVG using viewBox can not be correctly resized when they are used as WorkspaceImage for node or container in Sirius. If the version of Batik is changed, the commit efd3b969 [3] must be reverted and a particular attention must be done to diagrams containing SVG using viewBox. Indeed, in this kind of diagram, the visible size of the figure using SVG is not the same as what is stored in the GMF Model. For example in project projectWithSVG (from projectWithSVG.zip), in the diagram 13, the node A has a GMF size of 140x80 pixels but the visible size is 140x140 pixels. So a migration participant will be probably necessary. This sample has been extracted from data of test org.eclipse.sirius.tests.unit.common.migration.DiagramMigrationTestCampaign02. [1] https://www.sarasoueidan.com/blog/svg-coordinate-systems/#svg-viewbox [2] https://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?revision=1787412&view=markup#l132 [3] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=efd3b9696ba32572b6494bacfb51899cb2b2408a
See Bug 522740. An upgrade to 1.9.0 is almost mandatory.
The patch at https://git.eclipse.org/r/c/117555/ includes the necessary changes. It's not merged yet as for now it requires depending on integration versions of Orbit and GMF Runtime (which may disappear at any point).
New Gerrit change created: https://git.eclipse.org/r/122769
Gerrit change https://git.eclipse.org/r/122769 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=13a6fb3a253720a7ac8c69b117623a6dfacb1328
Fixed by 13a6fb3a253720a7ac8c69b117623a6dfacb1328.
Need further analysis as the node A is displayed with a size of 140x140 instead of the expected 140x80.
This issue has been marked as Resolved. But this is not the case, the new version of Batik is not enough. I also tested to revert the commit pointed in initial description and the behavior is always KO (wrong resize with a SVG troncated). This issue is removed from 6.0.0.
New Gerrit change created: https://git.eclipse.org/r/123724
Gerrit change https://git.eclipse.org/r/123724 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9840db18cd361540f9e4f063d498dfee99dba53a
New Gerrit change created: https://git.eclipse.org/r/123937
Gerrit change https://git.eclipse.org/r/123937 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d31c66ca27e5dc72ee92272ff5fc01becafd0691