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

# copy(using:)

Creates an immutable copy of a graphics path transformed by a transformation matrix.

## Declaration

```swift
func copy(using transform: UnsafePointer<CGAffineTransform>?) -> CGPath?
```

## Parameters

- `transform`: A pointer to an affine transformation matrix, or NULL if no transformation is needed. If specified, Core Graphics applies the transformation to all elements of the new path.

## Return Value

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

## See Also

### Copying a Graphics Path

- [copy()](coregraphics/cgpath/copy().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)
