Share via


CGGradient.Create(Single, CGColorSpace, NFloat[], NFloat[]) Method

Definition

Create a CGGradient with the specified content headroom.

public static CoreGraphics.CGGradient? Create(float headroom, CoreGraphics.CGColorSpace? colorSpace, System.Runtime.InteropServices.NFloat[]? components, System.Runtime.InteropServices.NFloat[]? locations);
static member Create : single * CoreGraphics.CGColorSpace * System.Runtime.InteropServices.NFloat[] * System.Runtime.InteropServices.NFloat[] -> CoreGraphics.CGGradient

Parameters

headroom
Single

The content headroom for the new CGGradient.

colorSpace
CGColorSpace

The colorspace to use for the gradient. This colorspace must support HDR.

components
NFloat[]

The color components to map into the new CGGradient.

locations
NFloat[]

An array of values that determines where, in the range from 0.0 to 1.0, should each color be located in the new CGGradient.

Returns

A new CGGradient if successful, null otherwise.

Applies to