[Qgis-developer] Changing colours of SVGs

custard custard at westnet.com.au
Tue Jun 3 10:36:30 PDT 2014



On 03/06/14 21:50, Paolo Cavallini wrote:
> Il 03/06/2014 15:47, custard ha scritto:
>
>> I'm not sure that those are proper svg. They look like svg wrapped around something
>> binary (a png?). I didn't know that was legal.
>
> it should be

Ah, so much for V for Vector.

>> Either way they're lacking the "fill", "stroke", and "stroke-width" parameters that
>> the sourcepole post needs to make things editable.
>
> yes, the question is how to add them without redoing it by hand for potentially
> hundreds of symbols
>
>> I did up a little shell script that worked on the examples I had, but given your
>> examples I need to play with it a bit because it should fail for our examples better
>> than it does. I can put that up somewhere if people are interested.
>
> please, do. the first use would be to apply it to the existing standard symbols and
> make them editable.

It's quite rough - but should handle simpler cases.
It should also flag files that aren't suitable or probably have already 
been modified.

https://github.com/mewoch/mod_svg

./mod_sh file1.svg (files.svg)

and should generate file_mod.svg - but there's a commented out line to 
change this if you decide you trust it.

-ramon.


More information about the Qgis-developer mailing list