I am using the following code to draw a line graph on a custom NSView
for var index = 0; index < (dataPointsArray.count - 1); index++ {
NSBezierPath().lineWidth = 20.0
NSBezierPath.strokeLineFromPoint(dataPointsArray[index], toPoint: dataPointsArray[index + 1])
}
This snippet is contained within a function that is called by drawRect() within the Custom View.
The line draws correctly within the coordinate system of the view. However, the line is drawn at the same width (one pixel width) regardless of the .lineWidth setting (e.g., 5.0, 10.0, 20.0 etc) which seems to have no impact on the line that is actually drawn).
Is anyone able to advise what might be creating this issue for me. I haven't been able to find a previous question that raises this issue.