• 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
Re: How to create NSCursor from CGBitmap?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create NSCursor from CGBitmap?


  • Subject: Re: How to create NSCursor from CGBitmap?
  • From: Graham Cox <email@hidden>
  • Date: Sat, 29 Oct 2011 13:50:11 +1100

On 27/10/2011, at 4:17 AM, Howard Moon wrote:

> Unfortunately, I just noticed that the NSImage function initWithCGImage:size: is not supported until OS X 10.6, and I need to support 10.5 as well.  How can I create my NSCursor objects from my CGBitmap objects, in a manner that IS supported in 10.5?


Create an NSBitmapImageRep from the bitmap (you may not even need to use a CGBitmap, if the bits are in a supported layout, you can simply wrap a NSBitmapImageRep around it directly) then add that rep to an NSImage, which you pass to NSCursor.

--Graham

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to create NSCursor from CGBitmap? (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: Draw a non-antialiased image (NSImage)
  • Next by Date: NSDocument app notification of restoring windows
  • Previous by thread: How to create NSCursor from CGBitmap?
  • Next by thread: Re: How to create NSCursor from CGBitmap?
  • Index(es):
    • Date
    • Thread