<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I also added a warning when no entities are replaced within the icon.<br>
Do you feel that I should actually increase the granularity, instead<br>
providing warnings separately for strokes and fills?<br></blockquote><div><br></div><div>I chose to separate these, so that it will warn that no strokes were replaced even if some fills were, and vice versa.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The only remaining "oddity" in the script right now is that,<br>
regardless of the colors that are used for stroke/fill entities, the<br>
script will set the stroke and fill colors in the output to (#666666,<br>
#ffffff) when a guess is made. On the other hand, when you explicitly<br>
pass them with -s and -f, the converted icon will retain the<br>
explicitly set colors. What do people think correct behavior is here?<br>
Always resort to the default color pair, even when the colors are<br>
passed? (You can just edit the entity declarations at the top to set<br>
it to anything after running the script...) Always use the passed or<br>
guessed values? (I didn't do it this way because, due to some<br>
restrictions in the way the SVG DOM can be edited, I have to insert<br>
the entities into the raw text before parsing the DOM, which means I<br>
have to do it before I can make a guess as to the correct entity<br>
colors...<br></blockquote><div><br></div><div>I've taken care of this, as it bugged me and seemed inconsistent. The script will now output a sugarized icon that looks exactly the same as the input, by default. If desired, you can pass the -d flag to insert the default color entities that will be recommended for "uninstantiated activity icons". Note that the output colors are therefore independent of the colors passed in with -s and -f, which are used solely to tell the script which hex values to replace with the entities, and not what color to output. I considered adding -S and -F options which would specify the output colors, but I didn't really think of a use case for this...it seems that the input colors or the defaults should be sufficient.</div>
<div><br></div><div>Finally, I noticed after my experiments with the Moon icon that the guess algorithm was completely useless, since it used a mask (it always guessed black and white). To get around this, I now filter out mask elements when performing the guess, so it works just fine and makes a valid guess with any number of masks.</div>
<div><br></div><div>After the above changes and another batch of bug fixes and robustness improvements, mostly with respect to the -m capability, I'm finally satisfied enough with this to write it up on the wiki. I intend to do that later this afternoon; feel free to try the attached script at your whim. Thanks for your feedback again!</div>
<div><br></div><div>- Eben</div><div><br></div><div><br></div></div>