CocoaDev

Edit AllPages

I have an NSWindow with a custom view, InnerView as its contentView. Here’s the code for InnerView

The result looks like this: http://lavacat.com/wiki.gif

Why do I get black corners? – gekko513

What you are seeing is an RGBA image that isn’t drawing its alpha component correctly. If you save a tiff of the image and view the tiff in “Preview” you will see the corners drawn correctly. –zootbobbalu


You’ll need to override -isOpaque to return NO if you want to draw anything with alpha or transparency.

Strange. None of your suggestions seem to work. I even copied the example code from –zoot directly and I still got black corners, also on /tmp/window.tiff. I tried to override isOpaque, for all additional 3 combinations of adding the method to my NSWindow subclass SolWindow and the InnerView. I finally tried to remove the [self setOpaque:NO] that I had called in SolWindow.

Thanks, by the way, for trying to help out, and so quickly, too. – gekko513

(And if I swap dataWithPDFInsideRect with dataWithEPSInsideRect, I get 3 corners almost correct but the bottom left corner has an even larger black square.)