blend function urgently needed in kdelibs

Andreas Pakulat apaku at gmx.de
Mon May 21 20:54:46 BST 2007


On 21.05.07 14:31:45, Matthew Woehlke wrote:
> kdelibs desperately needs a color blending function. I am volunteering (yet 
> again) to provide one that looks like this:
> 
> KColor blend(const KColor& c1, const KColor& c2,
>              double k = 0.5, double r = 0.5, SPEC cs = CS_RGB,
>              int flags = BLEND_NORMAL, int cmask = 0x0000FFFF);
> 
> Can someone PLEASE suggest where I can put such a thing? (Due to lack of prior 
> response, if I don't hear back by next Monday I'm going to /pick/ somewhere and 
> people can bitch about it.)
> 
> The default arguments will result in k% c1 plus (1-k)% c2 (i.e. "normal" 
> blending) ...but it is extensible and BC to nearly anything.
> 
> No, KColor is not a typo; I want HSV and HSY support (I'll subclass QColor if 
> possible, otherwise will make conversion as painless as I can.) Actually 
> KColor::blend would be convenient anyway, so that would make the question 
> 'where to put KColor'.

I also think kdefx would be more apropriate than kdeui/colors, the
latter one is mainly for color-related widgets, while the former has
kstyle and co, and I guess KStyle would need such a thing (or am I wrong
there?)

And I would've talked to you about blend() anyway before putting
anything in KDevelop ;)

Andreas

-- 
You will be honored for contributing your time and skill to a worthy cause.




More information about the kde-core-devel mailing list