well where are you calling it?

That's the correct function, but only works when there is a graphics context set, and that's only inside drawRect: in a UIView.

I wandered through the documentation a little and got reasonably lost, it does talk about NSGraphicsContext in there, but remember a lot of the documentation was dragged over from OS X and some of the stuff in there doesn't exist on iPhone, NSGraphicsContext is one of them. I don't see any way to create one for the iPhone window, you can create bitmap ones I suspect, I think you need to be in drawRect:, but then again, if you're not, why do you want one?

I'm going to have to dive into the whole quartz and drawing code one day as I suspect there is a lot of great stuff down there .. but it's daunting.

On Nov 23, 2008, at 9:48 AM, DKJ wrote:

On 22-Nov-08, at 17:40 , Ken Ferry wrote:
Take a look here:


Thanks for the reference, but I'm doing this for iPhone, and the procedure seems to be different. The compiler doesn't recognise the NSGraphicsContext class. I tried using the UIGraphicsGetCurrentContext function, but that doesn't work either: I get an "invalid context" error when I use it in CGContextStrokeRect.

dkj



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to