Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:
Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:
- Subject: Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:
- From: Duncan McGregor <email@hidden>
- Date: Wed, 1 Jul 2009 20:51:44 +0100
Hi
I'm writing PDF's with RubyCocoa, and want to set the current graphics
context to a PDF context from CGPDFContextCreateWithURL so that I can
draw on it.
Essentially my code says (sorry, ObjC folks, Ruby follows)
@pdf_context = CGPDFContextCreateWithURL(pdf_url, CGRectMake(0, 0,
100, 100), nil)
.....
NSGraphicsContext.saveGraphicsState
nscontext =
NSGraphicsContext
.graphicsContextWithGraphicsPort_flipped(@pdf_context, true)
NSGraphicsContext.setCurrentContext(nscontext)
My problem is that graphicsContextWithGraphicsPort:flipped: crashes
RubyCocoa. It's a known issue, and has been fixed, but not shipped in
10.5.7
Can anyone suggest any workarounds that could get the pdf_context
current?
Thanks in anticipation
Duncan McGregor
_______________________________________________
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