[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: blend function urgently needed in kdelibs
From: Thiago Macieira <thiago () kde ! org>
Date: 2007-05-22 5:05:25
Message-ID: 200705220705.26357.thiago () kde ! org
[Download RAW message or body]
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
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic