0
CGPathに追加された行ごとにlineWidthやstrokeColorのようなプロパティを変更できるかどうか疑問に思っていました。 は現在、私はこのようなCGPathにを作成します。Swift 3(SpriteKit):CGPathの各行のプロパティを変更します。
let path = CGMutablePath()
points = [CGPoint(x: -372, y: -250), CGPoint(x: 372, y: -250)]
path.move(to: CGPoint(x: points[0].x, y: points[0].y))
//Somewhere here change the properties of the line before adding it
path.addLine(to: CGPoint(x: points[1].x, y: points[1].y))
//Or after here
Line.path = path
は、個別に各ラインのプロパティを変更することは可能です。このCGPathにに追加、または全体CGPathには一組だけの色と線幅を持っているのですか?