在我的代码中,我有一个使用以下代码在屏幕上绘制线条的函数: let color = NSColor(red:0.0, green: 1.0, blue:0.0, alpha: 1.0)我试图通过为path设置一个全局变量并更改我的函数来实际返回path,这样我就可以在函数外部访问它:
var path:NSBezie
从下面的图片中可以看到,细长的边界线似乎落在NSBezierPath.bounds矩形之外。CGFloat) // tell the display to redraw the old rect let y1=y*invertDeltaY
item.offsetLocationBy(x: x, y: y1) /