[Kde-games-devel] KGameRenderer Porting Experience

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Aug 3 22:57:09 CEST 2010


Aaron J. Seigo wrote:
> On August 3, 2010, Matthew Woehlke wrote:
>> The tricky part is how to specify the replacement color, since a
>> pre-defined list may not be sufficient (especially I think for plasma
>> themes; for games it may not be as problematic). The idea I had was to
>> implement a simple RPN/Forth parser, so some replacement rules could
>> look something like this:
>
> it would be even nicer, imho, if a standard palette of named clours could be
> provided and then replaced in the svg at runtime; could even be extended
>   perhaps to some gradient settings.

Looking to plasma themes as an example, how do you deal with 'I need the 
dark shade of the neutral foreground color of the window set'? That's 
not that unusual a request, especially if you start talking about themed 
icons. Sure, you can create a LOT of named colors, but my suggestion is, 
I think, actually LESS complex, and a whole lot more powerful.

Or do you mean to somehow have in the .svg a color name that would be 
replaced instead of a replacement table? If so, how would you do that 
(besides hand-editing the .svg)?

The replacement table idea would work perfectly well with gradients (at 
least so far as you would replace the stop colors the same as anything 
else). I'm not sure how you could define to replace a solid color with a 
gradient, since you need directionality (and how do you specify the 
coordinates?).

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
ENOWIT: .sig file temporarily unavailable



More information about the kde-games-devel mailing list