blend function urgently needed in kdelibs
Thiago Macieira
thiago at kde.org
Tue May 22 06:05:25 BST 2007
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,
but it has no Q_DECLARE_FLAGS; BlendMode or BlendFlags (choose one) is
declared in a non-flag mode but has Q_DECLARE_FLAGS. You want to review
that.
2) Please remove the protected function and the static inlines. They have
no business being in a public header file.
3) Constructors must be explicit or explicitly implicit. (i.e., add the
krazy mark if it's to be implicit)
4) If you want implicit sharing, use QSharedDataPointer.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- 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/20070522/c6e8a7e1/attachment.sig>
More information about the kde-core-devel
mailing list