Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- Subject: Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- From: Robert Clair <email@hidden>
- Date: Thu, 20 May 2004 09:10:19 -0400
Can you (or anyone else) think of any negative outcomes, before I file
a bug report myself?
How about "It would break lots of existing applications." ? ... for a
start
Currently, as you know, an NSBezier won't let you add a line until
you've added an initial point (I don't know about other curves, I
haven't tried them). Relaxing this restriction (by assuming that the
point from which the line is drawn is the final point in the path,
i.e., paths with only line elements in them are implicitly closed)
would have at least three positive outcomes:
And a rather large negative one - how can you assume
"paths with only line elements in them are implicitly closed" ???
Open polylines are not an unknown or unused item.
I don't understand why this is such a major item - you can easily add a
category
to NSBezierPath that does what you want by copying your first path (you
have to be
a bit careful, many paths have a final moveTo that you'll want to skip)
and then adding
the elements from the second path.
If you have to do a lot of editing or adding and removing segments,
keep the data
(points and segment type) in your own NSMutableArray or something and
then
walk the data structure to create a path when you need to draw it.
It may seem inefficient, but the time spent on the bookkeeping is
rather small
compared with the time spent rendering the path.
.....Bob
_______________________________________________
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.