On Sun, Nov 27, 2011 at 2:02 PM, Neil Toronto <neil.toronto at gmail.com> wrote:
> Moving to dev.
>> 16x16 is tiny! But I can see why. I've attached my current toolbar, which
> uses all 22px icons. They look a bit big.
(In case you're tempted, I'd like to avoid another option :)
> I'm doing more than just replacing icons. We need abstractions. Not having
> them is partly why DrRacket's icon set looks old and inconsistent. So here's
> what I've been working on.
Thanks for taking this on, Neil!
> 1. SVG icon sources in icons/svg, organized in sub-directories.
>> 2. icons/svg/render-png.rkt, which renders all the SVG sources at different
> heights (16, 24, 32, 48), in further sub-directories.
>> 3. icons/svg/load-icon.rkt, which contains functions that make it easy to
> load icons: it builds file names from info like style and height.
>> The last also has functions for composing icons at runtime, and abstractions
> for common compositions. For example, this would make a blue, diffuse
> version of the wide macro stepper icon:
>> (icon-ht-append (load-icon "misc" "hash-quote-diffuse" height)
> (step-icon "blue" "diffuse" height))
>> And `step-icon' builds an icon by appending a triangle and a bar.
>> Today, I'm going to change render-png.rkt to colorize icons by replacing
> certain named gradients in the SVG sources.
>> Critiques or suggestions?
>> Also, I have questions.
>> 1. Do icons have to be loaded with 'png/mask? Combining masked bitmaps is
> kind of a pain.
No no, that's just from back before we had alpha bitmaps. Please get rid of it!
> 2. What would you (or anyone) think of using Inkscape or another SVG
> renderer as part of the build? Would it be better to not require it, and
> just have anybody who changes the SVG sources re-run render-png.rkt?
I think, at this point, better not to require it.
But we do need an svg library in Racket. If I were doing it I'd make
something that loads an svg into a data structure that can be passed
across places and have a separate "draw this svg into a dc" function
(or maybe turn it into some other racket/draw thing, as appropriate).
I guess this should go into racket/draw, too.
Robby