What to do about KColor?
huntedhacker at tiscali.co.uk
Mon May 28 19:40:58 BST 2007
On Monday 28 May 2007, Andreas Pakulat wrote:
> On 28.05.07 18:10:42, Thomas Zander wrote:
> > On Monday 28 May 2007 16:37:37 Ingo Klöcker wrote:
> > > Whoever adds code to our core libraries should be aware of the
> > > fact that this functionality will be used by people who are not
> > > necessarily experts in the domain of this functionality.
> > > Functionality that does require more than a slight understanding
> > > of the matter and some common sense does IMO not belong into our
> > > core libraries but into some special purpose libraries, like say
> > > Pigment. So please keep the color related stuff in kdelibs dead
> > > simple and easily understandable for idiots like me. Thanks!
> > Fully agreed, and I was under the impression that this new method
> > that was committed this morning does exactly that.
> > It blends 2 colors. Nothing more, nothing less.
> As I said above, just doing blendColor(c1,c2) doesn't give you
> anything but c2 (unless c2 already has an alpha set). Thats the main
> point, calling that function what I want to end up is a mix of those
> two colors, not the original c2, without any extra work.
I agree with this - the function name is very confusing, because it
_doesn't_ blend two colours. It overlays the second on the first.
What would make sense to me would be:
where the implementation is identical to the current blendColor, or
blendColor(c1, c2, mix = 0.5)
where the implementation does something like
return overlayColor(c1, c2);
Obviously, this would need some thought as to what it would do in the
case the c2's alpha has already been set.
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
Please avoid sending me Word or PowerPoint attachments.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel