Moving to a separate issue.
Saving the imagerep as TIFF looks okay, and I tried a few other things, but I've no idea what's wrong. It works as of 1.3.20, and drawing a red fill into the view works as expected.
The latest nightly build fails; the compositing operation should be copy for clearing the imagerep, and if the view is still in an overlay window the image can be drawn with copy as well.
This is really weird, the code is essentially the same except for moving it around.
The reason I was not using NSRectFill and NSCompositeCopy is that I'm pretty sure that NSCompositeCopy did not support transparency (it does seem to do that on Leopard).
The code was developed and tested on 10.4, so it certainly worked there...and the docs for NSRectFill say it copies RGBA values. I don't think you can erase a rect by painting pure alpha with SourceOver.
The SourceOver shouldn't matter, because the image is cleared initially
I was saying that copy is required to clear the bitmap rep. Drawing the image could use sourceover. Doesn't matter, since it's now working on 10.4 Server :).
I notice that it seems to flash clear before updating the mask as you type characters in the searchfield, but I'm assuming it does that on 10.5 as well.