blendColor that doesn't need additional setup code

Matthew Woehlke mw_triad at users.sourceforge.net
Tue May 29 22:52:18 BST 2007


Aaron J. Seigo wrote:
> On Tuesday 29 May 2007, Matthew Woehlke wrote:
>> What do you consider Plastik to be?
> 
> according to frederikh, the blends in plastik are generally work arounds for 
> various defficiencies in Qt3's QPainter which are no longer necessary; that 
> code apparently needs to be rewritten with the blend functions no longer 
> necessary.

I was just looking at it, and that is certainly true to an extent. I 
thought that also there were places where using alpha drawing instead of 
blending would require drawing twice where currently Plastik only draws 
once, but I might be wrong. And even if not in Plastik, there are 
certainly examples in Ion where this is the case.

In any case, it occurs to me that this function might be useful:

inline QColor setAlpha( QColor c, qreal alpha ) {
   c.setAlphaF( alpha );
   return c;
}

...but useful enough to put in kdelibs (doing no more than it does)? If 
we're stuck with Zack's signature, IMO yes. Otherwise I would lean 
towards "no".

-- 
Matthew
"A mouse is a device used to point at the xterm you want to type in."
   --Kim Alm, A.S.R.





More information about the kde-core-devel mailing list