Contents

stroke(_:with:style:)

Draws a path into the context with a specified stroke style.

Declaration

func stroke(_ path: Path, with shading: GraphicsContext.Shading, style: StrokeStyle)

Parameters

  • path:

    The path to outline.

  • shading:

    The color or pattern to use when outlining the path.

  • style:

    A style that indicates how to outline the path.

Discussion

If you only need to control the style’s lineWidth property, use stroke(_:with:lineWidth:) instead.

See Also

Drawing a path