(Yeah, I see the DEPRECATED. All the graphics stuff is DEPRECATED )
Problem is, the REALGraphicsDC method does not exist. The plugin shim can’t find it, so I end up with a 0x0 context. A quick check with nm shows that none of the Xojo frameworks export that symbol. confirming what I see in the plugin.
Have any of you written a graphics plugin for Xojo on Mac? Do you rely on QuickDraw?
Christian, thanks. g and control are not nil in the constructor as shown in the NSLog statement. This code also works fine when using QuickDraw. I am mostly concerned that I am unable to get a CGContextRef without using QD.
It’s currently a Carbon application in the process of being Cocoa-ified. Are you saying that once we “flip the switch” it should start to work? If so, I’ll pipe back when the switch has been flipped…
For Carbon, you still need QuickDraw, it think.
In my plugin I do a lot of workarounds to built still an Carbon support.
Apply removed most of the APIs already from headers.
For Cocoa, the CGContextRef is easy to get from graphics or picture objects via handles.
We flipped the figurative switch this weekend, and our Xojo app is now Cocoa-based as opposed to Carbon-based. And calling the Handle with type 5 gives me back a CGContextRef that I can mess with right away.
So far everything seems to work as normal: I can get bitmaps, dimensions, mess around with CGDataProviders, it’s all good. And it’s all built using the 10.8 SDK. Can’t wait to move to a later SDK!
Thanks to everyone and esp. Joe, that helped a lot.