Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: About DrawPicture() and GetPicture()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About DrawPicture() and GetPicture()




On Nov 29, 2005, at 5:12 AM, Oleg Svin wrote:

Since these functions are deprecated, it is a good idea to replace them with a modern stuff.

I would substitute GetPicture with this:
- read the content of the resource into a CFDataRef
- create a CGImageSourceRef from that data (probably, it would be wise to set kCGImageSourceTypeIdentifierHint to CFSTR ("public.image") or even CFSTR("com.apple.pict"))
- get a CGImage from it
- don't forget to release all these guys

Since PICT can contain vector image data it's probably better to use the PICT support in Quartz. You have to create a standard CoreGraphics data provider that refers to your PICT data, then use QDPictCreateWithProvider and QDPictDrawToCGContext.


Regards,
Nick Nallick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >About DrawPicture() and GetPicture() (From: Kevin Gu <email@hidden>)
 >Re: About DrawPicture() and GetPicture() (From: Oleg Svin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.