Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- Subject: Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- From: Steve Sims <email@hidden>
- Date: Wed, 19 May 2004 16:08:09 -0400
On 19 May 2004, at 10:59, Hamish Allan wrote:
Hi Steve,
Thanks for your reply. I don't suppose it's possible to append two
paths to make one closed path, or to change NSMoveToBezierPathElement
to NSLineToBezierPathElement in-place? I had a look at the methods
available in NSBezierPath but nothing sprang to mind.
Having looked at the docs myself I too can't see a direct way to change
the type of an individual path element. The way to do it would seem to
be to create a new NSBezierPath by itterating through your source path
one element at a time using elementAtIndex:associatedPoints:.
It's a shame that there aren't better facilities made available for
editing the elements of an NSBezierPath. It would also be useful to be
able to add elements at certain points within the path. The best way I
can see to do that kind of thing right now is to maintain a separate
array of path elements from which an NSBezierPath can be recreated.
Alternately you could keep an array of path elements and bypass
NSBezierPath entirely, making use of the CG calls instead.
Redesigning NSBezierPath to be a subclass of NSMutableArray would seem
to be a sensible way to accomplish this. Maybe in Tiger... I've
already filed a bug report suggesting this.
Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.