Here's the background:
I want to be able to have an array of points and then draw line segments between these points starting at (0,0).
So what I do is add points to the array, and then send a setNeedsDisplay:YES to my custom View.
In the drawRect: function, I create a NSBezierPath and loop through the NSMutableArray and by using lineToPoint, I am able to create the effect I want.
HOWEVER, after about 3 Points, I get a line connecting the last point drawn to the origin (NOT WANTED).
This is my first time working with NSBezierPaths, So I'm sure theres just something I've Overlooked.
I've also attached the project I'm using.
Any Ideas? Thanks in Advance
I want to be able to have an array of points and then draw line segments between these points starting at (0,0).
So what I do is add points to the array, and then send a setNeedsDisplay:YES to my custom View.
In the drawRect: function, I create a NSBezierPath and loop through the NSMutableArray and by using lineToPoint, I am able to create the effect I want.
HOWEVER, after about 3 Points, I get a line connecting the last point drawn to the origin (NOT WANTED).
This is my first time working with NSBezierPaths, So I'm sure theres just something I've Overlooked.
I've also attached the project I'm using.
Any Ideas? Thanks in Advance