Bug report #13847
svg markers with svg files not defining viewBox fails to properly export, wrong outline size
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Nyall Dawson | ||
Category: | Symbology | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21871 |
Description
A regressions slipped into QGIS master which leads to broken composer export of svg marker symbology when the svg file does not define a viewBox tag. As the dpi grows (or as you zoom into the composer sheet and refresh the map item canvas), the outline grows exponentially.
Steps to reproduce:- Open the attached svg_viewport_issue test project
- Open the Composer 1
- Set the zoom level to 100%, and refresh the map item, the two svg markers should be more or less the same
- Set the zoom level to 400%, and refresh the map item, the outline of the svg marker to the right (the one with a viewBox-less svg file) is broken
Serious regression, let me know if I can do anything else to facilitate things.
(oups, somehow, my brain's wiring got viewBox <-> viewPort confused :) )
History
#1 Updated by Mathieu Pellerin - nIRV almost 9 years ago
- Subject changed from svg markers with svg files not defining viewPort fails to properly export, wrong outline size to svg markers with svg files not defining viewBox fails to properly export, wrong outline size
#2 Updated by Nyall Dawson over 8 years ago
- Resolution set to invalid
- Status changed from Open to Closed
Not a regression - this same behaviour has been present for < 2.14, and is caused by parameterised outline width in an svg which doesn't have a viewbox. There's no solution to this apart from fixing the svg and adding the viewbox. Without the viewbox, it's impossible to determine the actual size of the svg and scale the outline width parameter into the units required to match the svg dimensions.