Re: NSGraphicsContext PDF crash
Re: NSGraphicsContext PDF crash
- Subject: Re: NSGraphicsContext PDF crash
- From: Wesley Smith <email@hidden>
- Date: Mon, 3 Jan 2011 17:31:18 -0800
>> NSBezierPath *p = [[NSBezierPath bezierPath] retain];
>> [p lineToPoint:NSMakePoint(100, 100)]; // <----------------- crashes here
>
>
> The 'crash' presumably is an exception stating 'no current point for operation' or words to that effect.
>
> You can't do a lineToPoint as the first op in a bezier path - it needs a starting point. The first op needs to be a moveToPoint or something that implies one, such as appending a rect, etc.
Looks like this the culprits. I had assumed that there would be a
default value in such a case, but apparently not. I grabbed some code
from the Cocoa_CG_arc_demo in the end and turned it into a PDF
generator. Once that worked, I put it in my shared lib and all seems
to work. Thanks for the help!
wes
_______________________________________________
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