Re: NSBezierPath line
Re: NSBezierPath line
- Subject: Re: NSBezierPath line
- From: Henry McGilton <email@hidden>
- Date: Wed, 13 Apr 2005 11:39:37 -0700
On Apr 9, 2005, at 12:19 PM, Ian was here wrote:
Yeah, that's what I figured. It would be nice if Apple
created a method that would return an origin point as
well as the current point. Oh well.
I have followed this thread in a desultory fashion, and
I am somewhat baffled by the problem. You want to get
the points at either end of a NSBezierPath line? Where
did the NSBezierPath line come from in the first place?
One presumes that somewhere, some part of your code created
the NSBezierPath line to start with, and then, one further
presumes, the code created a couple of points to indicate
the start and end of the line, yes?
So, if you want the points on the line, why not just use
the original information? Or is there something more
subtle that was not stated?
If in fact the NSBezierPath line came from out of the
blue sky without any intervention on your part, there are,
as Ricky Sharp implied, a plethora of methods to access
elements of a path, as described in
'Accessing elements of a path'
Cheers,
........ Henry
--- Ricky Sharp <email@hidden> wrote:
On Apr 8, 2005, at 6:11 PM, Ian was here wrote:
I'm trying to get the points at either end of an
NSBezierPath line. Does anyone know how to do
this???
Not sure if there's a simpler way, but look at
elementAtIndex:associatedPoints:
I would iterate over the path elements (see
elementCount and
elementAtIndex:) and depending upon the type of
element, record the
given point.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden