<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGraphicsContext/AttributeKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSGraphicsContextAttributeKey"
  },
  "title" : "NSGraphicsContext.AttributeKey"
}
-->

# NSGraphicsContext.AttributeKey

Constants that specify the dictionary keys for the attributes of the graphics context.

```
struct AttributeKey
```

## Discussion

You use these dictionary keys with [`init(attributes:)`](/documentation/AppKit/NSGraphicsContext/init(attributes:)) and [`attributes`](/documentation/AppKit/NSGraphicsContext/attributes).

## Topics

### Attribute Keys

[`static let destination: NSGraphicsContext.AttributeKey`](/documentation/AppKit/NSGraphicsContext/AttributeKey/destination)

Specifies the destination.

[`static let representationFormat: NSGraphicsContext.AttributeKey`](/documentation/AppKit/NSGraphicsContext/AttributeKey/representationFormat)

Specifies the destination file format.

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSGraphicsContext/AttributeKey/init(rawValue:))

Creates a new instance with the specified raw value.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)