Skip navigation.
 
mlRe: NSBezierPath line
FROM : Henry McGilton
DATE : Wed Apr 13 20:39:37 2005

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_removed>> 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.

Related mailsAuthorDate
mlNSBezierPath line Ian was here Apr 9, 01:11
mlRe: NSBezierPath line Ricky Sharp Apr 9, 01:27
mlRe: NSBezierPath line Ian was here Apr 9, 21:19
mlRe: NSBezierPath line Henry McGilton Apr 13, 20:39