Re: OR compositing operation?
Re: OR compositing operation?
- Subject: Re: OR compositing operation?
- From: Oleg Krupnov <email@hidden>
- Date: Tue, 22 Sep 2009 18:07:07 +0300
Thanks for quick reply.
> Rr = (Sr > Dr) ? Sr : Dr
> Rg = (Sg > Dg) ? Sg : Dg
> Rb = (Sb > Db) ? Sb : Db
Yes, that's what I want. After giving it another thought, I see that
it's not equivalent to bitwise OR, say MAX (1,2) = 2, wheres OR (1,2)
= 3.
Anyway, I would like to know if it's possible to use the MAX
compositing operation (this time I need MAX, but maybe I will also
need other, such as MIN, OR, AND, NOT, whatever). I have checked all
values of NSCompositingOperation, but haven't found what I need. They
all seem to be dealing with transparency mostly, not with color
values.
Any ideas?
Here's where I found this problem. I'm implementing a cross-fade
animation of text. One string fades out, and another string fades in
at the same time. The problem is that in areas where the text glyphs
from the two strings overlap, the sum of colors results in brighter
pixels than each of the strings taken separately. This results in an
annoying flash of brighter color in the middle of the animation. I'd
like to fix it by limiting the brightness of all pixels by the value
of the text color.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden