Hi, @singmajesty, thanks for your reply, I know how valuable your time is.
I hope you nail the color transform for any type of object, for all the openfl targets.
I’ll take a look at vizanto work, but meanwhile I’ll try your idea, the readGraphicsData → modify fill color → drawGraphicsData to another shape. I’ll try to evaluate the performance impact when changing color in a considerable number of SVG. I’ve tried one of yours previous suggestion:
It worked but the end result was not as smooth as we could expect from a SVG.
Regarding my second problem, this is one thing I miss in the pair Flash Pro/Flash builder (actionscript). I would make all my assets in Flash Pro, in each asset I’ll name some symbols/Movieclips and then in Flashbuilder with actionscript embed the assets, then I can set each named symbol to a MovieClip instance and after that I can change the visibility, color, etc - it’s like a SVG with layers (or only paths, strokes, etc) and then easily change the properties of each layer using the ID, that is what I’m planning on doing for the new workflow inkscape/haxedevelop (openfl).
Imagine a simplistic example, an SVG pie chart with 5 diferent colors for each slice, Each layers/path has an ID with a number (1 to 5). Wouldn´t be great if we want to change the color of slice 5 before render, could be as simple as:
svgPieChart.color(0xFF0000, "5");
var shape = new Shape ();
svgPieChar.render (shape);
I believe this change has to happen before render, because after that the id is lost (correct me if I’m wrong).
@singmajesty what is the best way, in your opinion, to acomplish something like the previous pseudo-code? I mean, putting aside the inner logic solution, forking the SVG package, problably it’s not the best idea, because doing so, there’s little chance of a pull request of something this specific be accept for the sake of maintaining the SVG package simple, right? So what’s the best, extend the class or make an helper class, thinking that I’ll be sharing the code in github to help others with the same ordeal?
Thanks once more @singmajesty for your help, and sorry for the long post!