No need for a workaround for offscreen graphics...
No need for a workaround for offscreen graphics...
- Subject: No need for a workaround for offscreen graphics...
- From: Nicolas Normand <email@hidden>
- Date: Mon, 26 Aug 2002 17:19:42 +0200
Hi,
in my previous mail, I explained I couldn't make NSBitmapRep's
-initWithFocusedViewRect: method return a bitmap with alpha pixels.
Thanks to Mike Morton I realized the bitmap has an alpha channel if and
only if some pixels are not totally opaque. It's a easy as painting the
view with clear color before doing the actual drawing:
[[NSColor clearColor] set];
NSRectFill (bounds);
If some pixels are left transparent or semi-transparent, the bitmap
representation will have alpha. That's it.
I'd also want to thank Joe Esch and Eliot Slimcoe for the help although
I couldn't make it work the way they suggested (bitmapData didn't return
pixels values for a bitmap representation initialized from TIFF data and
drawing didn't occur in a preset bitmap representation after [image
lockFocus]).
Nicolas Normand
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.