---
title: saveGraphicsState()
framework: appkit
role: symbol
role_heading: Type Method
path: appkit/nsgraphicscontext/savegraphicsstate()-swift.type.method
---

# saveGraphicsState()

Saves the graphics state of the current graphics context.

## Declaration

```swift
class func saveGraphicsState()
```

## Discussion

Discussion This method sends the current graphics context a saveGraphicsState() message and pushes the context onto the per-thread stack.

## See Also

### Managing the Graphics State

- [restoreGraphicsState()](appkit/nsgraphicscontext/restoregraphicsstate()-swift.type.method.md)
- [restoreGraphicsState()](appkit/nsgraphicscontext/restoregraphicsstate()-swift.method.md)
- [saveGraphicsState()](appkit/nsgraphicscontext/savegraphicsstate()-swift.method.md)
- [setGraphicsState(_:)](appkit/nsgraphicscontext/setgraphicsstate(_:).md)
