[Qgis-developer] Default fill/outline color for svg symbols

Andreas Neumann a.neumann at carto.net
Sat Oct 10 07:21:15 PDT 2015


Hi Nyall,

Thank you for having a look at the SVG symbol issues.

The SVG specification is very clear about what the default stroke and 
fill color is. See http://www.w3.org/TR/SVG/painting.html#FillProperties

The default fill is black and the default stroke is "none" (no stroke).

Let's not invent something new, if the SVG spec is unambiguous.

If someone wants a white fill by default he could set the fill to

fill="param(fill) white"

Where white would be taken as default whereas in the case of

fill="param(fill)" black should be the default according to the SVG spec.

Note that the param() notation is not yet part of the SVG specification 
- there is only a proposal at http://www.w3.org/TR/SVGParamPrimer/ - 
which unfortunately never make it to a recommendation and was never 
implemented by the browsers. The most likely way to get this into 
browsers is through CSS - these days ... It would then not only work in 
SVG, but also in HTML or other web standards.

Thanks,
Andreas

On 10.10.2015 12:02, Nyall Dawson wrote:
> Hi all,
>
> I'm currently working on fixing some issues with svg symbol rendering.
> I'm wondering what everyone's thoughts regarding
> http://hub.qgis.org/issues/10908 is?
>
> Situation is:
> - default fill color of svg marker symbols is white, outline is black.
> - Up until 5 minutes ago, there was a bug regarding outline widths for
> svg images. This meant that the width had to be ridiculously large to
> be visible (eg 10-20x larger than desired). After fixing this bug the
> outline is now visible in the svg image selector, so possibly that's
> #10908 fixed.  BUT - now I think the default svg marker width is much
> too large (1 mm). I think this should be something more like 0.2 mm.
>
> So I need some feedback. What should be the CORRECT default SVG marker
> fill and border color, and border width?
>
> (Personally, I'm leaning toward leaving it as white fill, black
> outline, 0.2mm width.)
>
> Nyall
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list