Magic Transparency Trick

Cabel told me he wanted Audion's faces to be alpha-channeled onto the Mac OS 8 desktop and I snickered. I may have guffawed. "Yeah, that's impossible," I told him. And then a few days later I had a semi-working prototype. The idea was so cool, I just had to try it.

Although there were some tricky bits, it actually wasn't too bad overall. Before putting Audion's control window up, we'd grab a capture of the desktop area underneath where the control window was going. Then we'd composite the face onto the desktop chunk somewhere offscreen and finally copy the whole thing back to an onscreen window. So, you actually had an opaque window that appeared to be translucent.

As you dragged the window around the screen, we'd anticipate where it was going to be moved to, use that to update our saved copy of the underlying desktop, re-composite offscreen, and then finally move the actual on screen window.

We had to jump through a considerable number of hoops to try to keep the Audion face in-sync with what should be appearing underneath it. Classic Mac OS doesn't cache the contents of windows like Mac OS X does, so it is impossible to "screen capture" part of a window that is obscured by another window. Hence all the fancy footwork.

It's not foolproof though. We had no way of knowing, for example, if an application underneath Audion updated its appearance, so you would get a chunk of the old appearance in Audion. Disconcerting, but I think we did about the best possible job we could have, given the limitations of the Classic Mac OS.

-Steven Frank