Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- Subject: Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- From: Hamish Allan <email@hidden>
- Date: Wed, 19 May 2004 15:59:09 +0100
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.
cheers,
Hamish
On May 19, 2004, at 6:59, Steve Sims wrote:
Yep. Your path 2 is composed of different types of path elements from
path 1.
The elementAtIndex call actually returns the type of path element at
the index. If you looked at the path type I think you'll find that
the two paths above are not identical; line and move path elements are
different... Whilst the two paths contain the same points path 2
actually describes two separate lines, rather than a square, so
there's no fill area for that path. If you stroked the paths rather
than filling them you would have seen this.
Just one other point... I would have used closePath to ensure the
path was properly completed. I'm not sure that really matters much
though.
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.