blend function urgently needed in kdelibs
mw_triad at users.sourceforge.net
Tue May 22 23:40:48 BST 2007
Tobias G. Pfeiffer wrote:
> On Tuesday 22 May 2007, 00:41, David Faure wrote:
>> On Tuesday 22 May 2007, Matthew Woehlke wrote:
>>> Seven parameters (hehe... actually it's going to be eight) are pretty
>>> well required if it's to be flexible
>> Another solution is to create a KColorBlender class, with a number of
>> setter methods and a blend() method (without arguments - i.e. the "do it
>> now" method)... OK not sure it makes sense, just thinking out loud about
>> how to avoid 8 params :)
> Why not have something like
> blend(const QVector<KColor>&, const QVector<float>&, ...)?
> You would a) reduce the number of parameters, b) avoid a hardcoded two-color,
> three-color etc. version.
Firstly: I don't even want to /contemplate/ a three-way blend, at least,
not further than blend( blend( a, b ), c ). Secondly, it would be three
times as hard to call a function with that signature :-).
The current signature takes six arguments, four of which are optional.
"Nobody expects the traditional Bourne shell!"
More information about the kde-core-devel