• 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: Rasterizing an NSString to a bitmap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rasterizing an NSString to a bitmap


  • Subject: Re: Rasterizing an NSString to a bitmap
  • From: Dietmar Planitzer <email@hidden>
  • Date: Wed, 9 Jun 2004 23:49:43 +0200

On Jun 9, 2004, at 11:25 PM, John Stiles wrote:

Given an NSImage, I am not sure if there is any guarantee that it will have an NSCachedImageRep.

NSImage always creates an NSCachedImageRep when you call -lockFocus on it. This is documented somewhere in the NSImage docs.

I agree that given an NSCachedImageRep, it's not hard to pull the pixels out. But as you state yourself, it's an implementation detail and one that Apple is not required to maintain in future OS updates.

Well, Apple must maintain this implementation detail because otherwise every graphics related Carbon app would instantly stop working. They expect that they can access the pixels of a window / framebuffer by accessing the PixMap of a GrafPort and locking that. In fact, Apple even mentions this technique in its "porting Windows apps to MacOS X" documentation.


Regards,

Dietmar Planitzer
_______________________________________________
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.


  • Follow-Ups:
    • Re: Rasterizing an NSString to a bitmap
      • From: Public Look <email@hidden>
    • Re: Rasterizing an NSString to a bitmap
      • From: John Stiles <email@hidden>
References: 
 >Rasterizing an NSString to a bitmap (From: John Stiles <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: Marcel Weiher <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: p3consulting <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: Marcel Weiher <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: John Stiles <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: p3consulting <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: John Stiles <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: Dietmar Planitzer <email@hidden>)
 >Re: Rasterizing an NSString to a bitmap (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Getting the version string of any program
  • Next by Date: Re: How to create a easy of use Installer?
  • Previous by thread: Re: Rasterizing an NSString to a bitmap
  • Next by thread: Re: Rasterizing an NSString to a bitmap
  • Index(es):
    • Date
    • Thread