Bug report #10908
SVG Markers are White
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19271 |
Description
In the layer properties on Ubuntu (from UbuntuGIS Repositories), 90% of the SVG layer properties are white. There are some that are black but the majority are white - which makes it a bit hard to see. I've attached a screenshot.
Associated revisions
Fix svg outline widths are incorrectly scaled (fix #11522)
SVG outline width sizes were not correctly calculated, and were
set to a constant value regardless of the rendered size of the svg
image. This meant that:
1. the rendered outline width was effectively randomly scaled
2. the width would change as the symbol size was modified
This change has some large flow on effects, eg:
- the large outline widths required to render an outline in <2.12
will now be drawn in their correct sizes, eg massive outlines. Projects
will need to be updated to reflect this.
- the default outline width set for the provided svg symbols (1 mm)
is much too large, so the symbols look bad with the default width.
This size needs to be modified in all the (~300 svg marker images)
- On the plus side, the long standing issue where most of the svg
symbols were rendered with white fill on white background and an
almost invisible black border is now fixed (refs #10908, #8538)
If svg files with params do not have a default value set, then don't
reset the fill/border color and border width when changing svg
marker/svg fill SVG files
This change makes the behaviour consistent between the svg marker
symbol and the other marker symbols. Additionally, svg files
which have customisable colors and NO default values set will
be shaded in gray fill/black outline in the svg selector widget,
to follow the same behaviour as the other marker symbol selectors.
Note that this change has NO EFFECT unless the svg files are
modified to remove the default param value, so there will be no
change for users' custom symbols. A follow up commit will need
to remove the default param values from the preinstalled SVG
files though. If you want to test in the meantime, I've modified
just the first two symbols in the accomodation group to make
this change for testing.
(refs #10908)
Remove default outline-width param from included SVGs if
default value is non 0
using the monstrosity:
zerowidth='!0'; grep -R -rl -P "\"param\(outline-width\) (?${zerowidth})(.*?)\"" | xargs sed -i -b 's/\(param(outline-width)\)[^"]*"/\1\"/g'
(fix #10908)
History
#1 Updated by Giovanni Manghi almost 10 years ago
- Affected QGIS version changed from 2.4.0 to master
- OS version deleted (
UbuntuGIS Repositories) - Operating System deleted (
Ubuntu 14.04) - Category changed from Symbology to GUI
see also #11907
#2 Updated by Nyall Dawson about 9 years ago
- Status changed from Open to Closed
Fixed in changeset 06c2190e3d9d1408ba0f9d58f7edf0c21160589b.