StrokeStyle
public struct StrokeStyle : Equatable
Type that hold style properties of a stroke.
-
The width of the stroke’s line
Declaration
Swift
public var lineWidth: CGFloat
-
The cap style of the stroke’s line extremes
Declaration
Swift
public var lineCap: CGLineCap
-
The way lines join in the stroke
Declaration
Swift
public var lineJoin: CGLineJoin
-
If the line join style is set to kCALineJoinMiter, the miter limit determines whether the lines should be joined with a bevel instead of a miter. The length of the miter is divided by the line width. If the result is greater than the miter limit, the path is drawn with a bevel.
Declaration
Swift
public var miterLimit: CGFloat
-
An array of dash sizes that determine the dash pattern.
Declaration
Swift
public var dash: [CGFloat]
-
How far into the dash pattern the line will start.
Declaration
Swift
public var dashPhase: CGFloat
-
Initializes an instance of a stroke style.
Declaration
Swift
public init( lineWidth: CGFloat = 1, lineCap: CGLineCap = .butt, lineJoin: CGLineJoin = .miter, miterLimit: CGFloat = 10, dash: [CGFloat] = [CGFloat](), dashPhase: CGFloat = 0 )
Parameters
lineWidth
The width of the stroke’s line
lineCap
The cap style of the stroke’s line extremes
lineJoin
The way lines join in the stroke
miterLimit
The miter limit if the join type is kCALineJoinMiter
dash
An array of dash sizes that determine the dash pattern.
dashPhase
How far into the dash pattern the line will start.