Bug report #10908

SVG Markers are White

Added by Randal Hale over 10 years ago. Updated about 9 years ago.

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.

bug_svg.png (121 KB) Randal Hale, 2014-07-17 08:28 AM

Associated revisions

Revision 16f700a5
Added by Nyall Dawson about 9 years ago

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)

Revision a784d6bc
Added by Nyall Dawson about 9 years ago

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)

Revision 66e6f399
Added by Nyall Dawson about 9 years ago

Remove default fill param from included SVG files if default is #FFF

using:
grep -R -rl \"param\(fill\):space:*#FFF\" | xargs sed -i -b 's/\(param(fill)\)\s*#FFF"/\1\"/g'

(refs #10908)

Revision be6faef0
Added by Nyall Dawson about 9 years ago

Remove default outline param from included SVG files if default is #000

using:
grep -R -rl \"param\(outline\):space:*#000\" | xargs sed -i -b 's/\(param(outline)\)\s*#000"/\1\"/g'

(refs #10908)

Revision 06c2190e
Added by Nyall Dawson about 9 years ago

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

Also available in: Atom PDF