---
title: set()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsaffinetransform/set()
---

# set()

Sets the current transformation matrix to the receiver’s transformation matrix.

## Declaration

```swift
func set()
```

## Discussion

Discussion The current transformation is stored in the current graphics context and is applied to subsequent drawing operations. You should use this method sparingly because it removes the existing transformation matrix, which is an accumulation of transformation matrices for the screen, window, and any superviews. Instead use the concat() method to add this transformation matrix to the current transformation matrix.

## See Also

### Setting and Building the Current Transformation Matrix

- [concat()](foundation/nsaffinetransform/concat().md)
