--nextPart2237479.Psfo4p2duV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Matthew Woehlke wrote: >kdelibs desperately needs a color blending function. I am working on it, >planning to have it go in Monday, May 28. > >blend() is reasonably complicated, but the colorspace conversion >functions are some of the biggest hitters in terms of code volume. I >already have rgb<->hsl (and I think rgb<->hsv, but those are common), I >need rgb<->hsy yet but hsy is very similar to hsv. Anyway, since some >commented it would be nice to see some actual code, I'm attaching what I >have so far... Comments: 1) You're mixing the enums. ColorSpec is declared in a flag-like manner,=20 but it has no Q_DECLARE_FLAGS; BlendMode or BlendFlags (choose one) is=20 declared in a non-flag mode but has Q_DECLARE_FLAGS. You want to review=20 that. 2) Please remove the protected function and the static inlines. They have=20 no business being in a public header file. 3) Constructors must be explicit or explicitly implicit. (i.e., add the=20 krazy mark if it's to be implicit) 4) If you want implicit sharing, use QSharedDataPointer. =2D-=20 =A0 Thiago Macieira =A0- =A0thiago (AT) macieira.info - thiago (AT) kde.org =A0 =A0 PGP/GPG: 0x6EF45358; fingerprint: =A0 =A0 E067 918B B660 DBD1 105C =A0966C 33F5 F005 6EF4 5358 --nextPart2237479.Psfo4p2duV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGUnoWM/XwBW70U1gRAkZdAKCcqFIyOPyaINHXhBFlMiAO4/29zgCfUeat 37eG4P8P0lKZsRRlM44CSuA= =cRZa -----END PGP SIGNATURE----- --nextPart2237479.Psfo4p2duV--