<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPathCreateCopyByStrokingPath",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGPathCreateCopyByStrokingPath"
  },
  "title" : "CGPathCreateCopyByStrokingPath"
}
-->

# CGPathCreateCopyByStrokingPath

Creates a stroked copy of another path.

```
extern CGPathRefCGPathCreateCopyByStrokingPath(CGPathRef path, const CGAffineTransform *transform, CGFloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, CGFloat miterLimit);
```

## Parameters

`path`

The path to copy.

`transform`

A pointer to an affine transformation matrix, or `NULL` if no transformation is needed. If specified, Core Graphics applies the transformation to elements of the converted path before adding them to the new path.

`lineWidth`

The line width to use, in user space units. The value must be greater than `0`.

`lineCap`

A line cap style constant—[`CGLineCap.butt`](/documentation/CoreGraphics/CGLineCap/butt) (the default), [`CGLineCap.round`](/documentation/CoreGraphics/CGLineCap/round), or [`CGLineCap.square`](/documentation/CoreGraphics/CGLineCap/square).

`lineJoin`

A line join value—[`CGLineJoin.miter`](/documentation/CoreGraphics/CGLineJoin/miter) (the default), [`CGLineJoin.round`](/documentation/CoreGraphics/CGLineJoin/round), or [`CGLineJoin.bevel`](/documentation/CoreGraphics/CGLineJoin/bevel).

`miterLimit`

The miter limit to use.

## Return Value

A new, immutable path. You are responsible for releasing this object.

## Discussion

The new path is created so that filling the new path draws the same pixels as stroking the original path.

If the line join style is set to `kCGLineJoinMiter`, Core Graphics uses the miter limit to determine whether the lines should be joined with a bevel instead of a miter. Core Graphics divides the length of the miter by the line width. If the result is greater than the miter limit, Core Graphics converts the style to a bevel.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)