---
title: "rotate(by:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/graphicscontext/rotate(by:)"
---

# rotate(by:)

Rotates subsequent drawing operations by an angle.

## Declaration

```swift
mutating func rotate(by angle: Angle)
```

## Parameters

- `angle`: The amount to rotate.

## Discussion

Discussion Calling this method is equivalent to updating the context’s transform directly using the angle parameter: transform = transform.rotated(by: angle.radians)

## See Also

### Applying transforms

- [scaleBy(x:y:)](swiftui/graphicscontext/scaleby(x:y:).md)
- [translateBy(x:y:)](swiftui/graphicscontext/translateby(x:y:).md)
- [concatenate(_:)](swiftui/graphicscontext/concatenate(_:).md)
- [transform](swiftui/graphicscontext/transform.md)
