[futurebasic] Re: [FB] window fades

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Thu, 1 Jul 2004 08:53:32 -0400
On Thursday, July 1, 2004, at 08:31  AM, tedd wrote:

>> From an old posting:
>> -snip-
>> Robert P.
>
> Robert P.
>
> Slick.
>
> I've seen that alpha stuff done on web sites too -- it's neat, but I 
> don't quite understand it.  Any references?
>
> tedd

OS X has an alpha channel for each window buffer. That makes good use 
of it. Don't confuse same with Flash / Shockwave.

It just means that pixels that are black in the mask, allow those in 
the source image to get copied over (though that can be reversed 
depending on mix methods) and those that are white do not...using an 
arithmetic transfer method.

The channel is usually a floating 1.0 - 0.0 representation...converting 
from RGB is easy enough.

Destination value = SrcValue*Fraction  + MaskValue*InverseFraction 
where Fraction =  1.0 - Maskpixel/255

So if the mask is black, then value= 0, and Fraction comes out at 1.0, 
or full source.

If mask is gray, now you have .5 resulting, and thus you get  Src*.5 + 
Mask*.5 and thus a blended copy.

Something like that. Invert where necessary, paint frogs blue, call it 
art. Toad ya.

Robert

---------------------------------------------

Bada bing Bada boooey, Orrin Hatch is Utterly Screwy. He's working 
secret for Al Quaeda, he is.  (See INDUCE act, and other dumb 
amendments proposed)