blend function urgently needed in kdelibs

Alex Merry huntedhacker at tiscali.co.uk
Mon May 21 21:39:55 BST 2007


On Monday 21 May 2007, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > On 21.05.07 14:31:45, Matthew Woehlke wrote:
> >> 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.)
> >
> > 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?)
>
> No, kdeui/colors is definitely wrong, but kdefx seems a little heavy
> for how basic I think of blend() being, which is why I'm eying
> kdeui/kernel. What do others think?

Note that kdeui links with kdefx, so, if anything, kdefx underpins 
kdeui.

The reason Andreas and I suggested kdefx was that it fits in with the 
nature of kdefx - it provides a general visual effect, rather than a 
specific visual widget.  Although kdeui/kernel provides non-widget 
things, they're interaction-with-X11/OS/etc style classes, which KColor 
doesn't really fit into.

If it were to go into kdeui, I'd say kdeui/util.

I guess it depends on how generic KColor is going to be - if it's there 
purely for blending, then I'd go for kdefx.  If it's a colour 
representation class that is (potentially) useful in other contexts, 
then kdeui/util is probably more appropriate.

Alex



PS [and rather OT]: is it just me, or kdefx a bit random?  Is there a 
reason for it being a separate library, rather than a subdirectory in 
kdeui?

And KCPUInfo just doesn't seem to fit - although it's there purely for 
the benefit of KImageEffect, it's also an exported interface, and 
linking against libkdefx for KCPUInfo certainly isn't intuitive...



-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070521/aebfd459/attachment.sig>


More information about the kde-core-devel mailing list