Open yissachar opened 9 years ago
svg file have multiples elements with colors. Which elements do you think the module should fill ?
I was thinking that it would recursively change all elements to the specified color. If that doesn't make sense, can the elements be exposed so that I can manually change the color of each one myself?
My use case is pretty simple - I have an SVG that is completely black, and I sometimes want to change it to be white.
this is not the goal of this module, but i'll look into it as soon as i have some time. But why d'ont you use a custom font for this or simply use 2 svg file with different colors ?
I could use multiple SVGs but it seems a shame to do that and add the extra size to the app when I can do it programmatically.
I originally tried custom fonts but it turns out they are broken on Android in TiSDK 4.x (see TIMOB-18968).
i will look into it as soon as i have some time for it.
@yissachar look at https://github.com/falkolab/Ti.SVGProduct/blob/master/example.js#L35
:+1: :)
It would be nice to be able to change the fill color of an SVG. For instance:
Should display the SVG as white, even if the original SVG source is not white.