Instance Method インスタンスメソッド

stroke(_:with:lineWidth:)

Draws a path into the context with a specified line width.

Declaration 宣言

func stroke(_ path: Path, with shading: GraphicsContext.Shading, lineWidth: CGFloat = 1)

Parameters パラメータ

path

The path to outline.

shading

The color or pattern to use when outlining the path.

lineWidth

The width of the stroke, which defaults to 1.

Discussion 議論

When you call this method, all StrokeStyle properties other than lineWidth take their default values. To control other style properties, use stroke(_:with:style:) instead.

See Also 参照

Drawing a Path