---
title: copy()
framework: coregraphics
role: symbol
role_heading: Instance Method
path: coregraphics/cgpath/copy()
---

# copy()

Creates an immutable copy of a graphics path.

## Declaration

```swift
func copy() -> CGPath?
```

## Return Value

Return Value A new, immutable copy of the specified path. You are responsible for releasing this object.

## See Also

### Copying a Graphics Path

- [copy(using:)](coregraphics/cgpath/copy(using:).md)
- [copy(dashingWithPhase:lengths:transform:)](coregraphics/cgpath/copy(dashingwithphase:lengths:transform:).md)
- [copy(strokingWithWidth:lineCap:lineJoin:miterLimit:transform:)](coregraphics/cgpath/copy(strokingwithwidth:linecap:linejoin:miterlimit:transform:).md)
- [mutableCopy()](coregraphics/cgpath/mutablecopy().md)
- [mutableCopy(using:)](coregraphics/cgpath/mutablecopy(using:).md)
