<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGGradientDrawingOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@E@CGGradientDrawingOptions"
  },
  "title" : "CGGradientDrawingOptions"
}
-->

# CGGradientDrawingOptions

Drawing locations for gradients.

```
struct CGGradientDrawingOptions
```

## Topics

### Constants

[`kCGGradientDrawsBeforeStartLocation`](/documentation/CoreGraphics/CGGradientDrawingOptions/drawsBeforeStartLocation)

The fill should extend beyond the starting location. The color that extends beyond the starting point is the solid color defined by the [`CGGradient`](/documentation/CoreGraphics/CGGradient) object to be at location 0.

[`kCGGradientDrawsAfterEndLocation`](/documentation/CoreGraphics/CGGradientDrawingOptions/drawsAfterEndLocation)

The fill should extend beyond the ending location. The color that extends beyond the ending point is the solid color defined by the [`CGGradient`](/documentation/CoreGraphics/CGGradient) object to be at location 1.

### Initializers

[`init(rawValue:)`](/documentation/CoreGraphics/CGGradientDrawingOptions/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)