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

Richard Duivenvoorde rdmailings at duif.net
Sun Oct 11 05:07:44 PDT 2015

On 11-10-15 13:48, Nyall Dawson wrote:
>> > Hi Nyall,
>> >
>> > what about fixing the first bug you were talking about, and do the rest
>> > in a commit after the release. In that way we can try this out a little
>> > more?
> Actually, it needs to be fixed before release. A lot of the included
> SVG images have ridiculously large border widths set, which in some
> cases makes the symbol unusable (eg look under the "backgrounds" group
> - the 2nd and 3rd symbols have such large border widths that the
> actual symbol is obscured). This wasn't noticable before as all
> borders where drawn extremely small, due to #11522.
> So I need to at least update all the default border widths in these
> images to a reasonable value. Given that, it's the perfect time to
> also fix the default colors too.
>> >
>> > I looked at the other non svg markers, and they have actually exact the
>> > same behaviour as you describe above. So that is a plus.
>> >
>> > But what is that 'DEFAULT' value you are talking about? Does that mean I
>> > can create a custom (non shipped) symbolset which have fixed colors? OR
>> > have icons which do NOT change color?
> Yes and yes. You could
> 1. make your own symbols which have the "param" modification and a
> default color so that you can change these colors but they have a
> preset default (no change from <2.12)
> 2. make your own symbols without bothering with the "param"
> modification so that the symbols always have a fixed color and the
> fill/outline color buttons will be disabled (no change from < 2.12 )
>> > What I'm talking about: I've once created a live map based on more or
>> > less 'standard colored' icons http://i.imgur.com/EHQOkPz.png
>> > What happens when I go from the red star to the blue triangle there? Do
>> > they stay the same color? Or CAN I make that they stay there standard
>> > colors, maybe by adding the 'DEFAULT' param in the svg?
> If you haven't done the param modification, then the colors won't be
> changed from the svg. If you HAVE done the param modification and set
> a default value, then that value will still be respected. (no change
> from < 2.12)
> So the only change from < 2.12 will be if I go an modify all the
> provided symbols to remove the default fill color, outline color and
> border width. THEN for just these included symbols the fill/border
> color/border width will be preserved when changing between the svgs.
> Ie, exactly the same behaviour as you see with the simple marker. I'll
> also make it so these symbols have a gray fill in the selector list to
> keep consistency with the simple marker selector.

Ok, clear. Thanks for all this explaining Nyall !

No objections from me anymore. Though it would be good if we write down
all this symbolisation knowledge somewhere...

Another question: this 'Simple marker' class in the 'Symbol layer
type'-dropdown. Can't we get rid of those, and make svg versions of
these then, and create a icon group 'simple marker'?
Actually the same with the 'ellipse markers' (we can do that with svg
also isn't it? Though I see 'rotation' is called 'angle' there....

Or are these essential for qgisserver where I understand the svg path's
are sometimes a little tricky?



More information about the Qgis-developer mailing list