[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: What to do about KColor?
From: Alex Merry <huntedhacker () tiscali ! co ! uk>
Date: 2007-05-28 18:40:58
Message-ID: 200705281941.04837.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]
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:
overlayColor(c1, c2)
where the implementation is identical to the current blendColor, or
blendColor(c1, c2, mix = 0.5)
where the implementation does something like
QColor mixColor(c2);
mixColor.setAlpha(mix);
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.
Alex
--
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic