Community
Participate
Working Groups
1. Create a diagram with a few SVG images on it 2. Resize SVG image based shapes such that SVG image becomes larger/smaller 3. Export the diagram to SVG (RenderedScaledGrsaphics must be used during the export) Actual: Note that SVG images will have original size. Expected: SVG images should scaled as they are on the diagram GraphicsSVG doesn't scale SVG images. Hence, either GraphicsSVG should scale the SVG images or scale factor inserted in the SVG DOM document.
SVG images are wrongly scaled during export. This can also be reproduced in 465575. Analysis: GMF uses a graphics wrapper which could either be RenderedScaledGraphics or (Rendered)MapModeGraphics. These wrappers delegate to GraphicsSWT, GraphicsSVG depending on whether you are exporting or inside the editor. The problem is that the class RenderHelper makes an instanceof DrawableRenderedImage test to differentiate whether it deals with the graphics wrapper from GMF or the device specific graphics. However, unlike GraphicsSWT, GraphicsSVG also implements this interface and thus wrongly delegates directly to it without applying scaling first. I´ll add a patch that fixes the problem
Created attachment 266739 [details] Patch that corrects the issue
Patch applied as 4d9ab970b2ae92907570628393aa0738b470706b.