• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
No need for a workaround for offscreen graphics...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Leak in NSFont (10.2) or am I missing something?
  • Next by Date: Re: Carbon Handles & NSData
  • Previous by thread: Re: QT movie info
  • Next by thread: NSViewHierarchyLock
  • Index(es):
    • Date
    • Thread