<!--
{
  "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

[`drawsBeforeStartLocation`](/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.

[`drawsAfterEndLocation`](/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:))



---

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)