---
title: "concatenate(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/concatenate(_:)"
---

# concatenate(_:)

Transforms the user coordinate system in a context using a specified matrix.

## Declaration

```swift
func concatenate(_ transform: CGAffineTransform)
```

## Parameters

- `transform`: The transformation matrix to apply to the specified context’s current transformation matrix.

## Discussion

Discussion When you call this function, it concatenates (that is, it combines) two matrices, by multiplying them together. The order in which matrices are concatenated is important, as the operations are not commutative. The resulting CTM in the context is:   CTMnew = transform * CTMcontext.

## See Also

### Working with the Current Transformation Matrix

- [ctm](coregraphics/cgcontext/ctm.md)
- [rotate(by:)](coregraphics/cgcontext/rotate(by:).md)
- [scaleBy(x:y:)](coregraphics/cgcontext/scaleby(x:y:).md)
- [translateBy(x:y:)](coregraphics/cgcontext/translateby(x:y:).md)
