asolfre / svg-android-2

Automatically exported from code.google.com/p/svg-android-2
Apache License 2.0
0 stars 0 forks source link

Replace multiple colors #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First, thanks for your updates.

I'm looking for the option to change multiple colors on the same SVG file. I 
didn't see any option to do so. I didn't dived deeply into the code, so I'm not 
sure if you have technical difficulties to do so or not.

I think that sending 2 arrays of colors, or a map of colors, that the search 
color would be the key and the value would be the replace color would seems 
logic. 

Some other approach can be as in the project 
https://github.com/josefpavlik/svg-android/blob/master/svgandroid/src/com/larval
abs/svgandroid/SVGParser.java which forked like you from the original 
svg-android project. He did the color switch based on the id, look for "public 
static SVG getSVGFromResource(Resources resources, int resId, HashMap<String, 
Integer> idToColor)"

Your project looks like the most updated one, therefore I thought that it was 
more logical to import those changes to your project.

By the way, there are some other changes in his project that you don't have, it 
might worth trying to merge his changes to your project.

Again, thanks

Original issue reported on code.google.com by n...@gobeepit.com on 31 Mar 2014 at 2:51