I'm trying to draw some dots connected with lines. The dot consists of the "nucleus" with orbital area around it.
The problem appears when I try to move those dots which gives me distorted lines:
In my drawRect:
method I iterate over an array of created dots and draw a bezier path by using lineToPoint:
methods.
Dot *prevDot = nil;
NSBezierPath *line = [NSBezierPath bezierPath];
for (Dot *dot in _dots) {
if (!prevDot) {
[line moveToPoint:dot.position];
} else {
[line lineToPoint:dot.position];
}
prevDot = dot;
}
[line stroke];
My question is what technique should I use to implement clean line update between points once one of them is moved?