[]
        
(Showing Draft Content)

C1.Util.DX.Direct2D.GradientStopCollection1.Create

Create Method

Create(DeviceContext, GradientStop[], ColorSpace, ColorSpace, BufferPrecision, ExtendMode, ColorInterpolationMode)

Initializes a new instance of the GradientStopCollection1 class.

Declaration
public static GradientStopCollection1 Create(DeviceContext context, GradientStop[] straightAlphaGradientStops, ColorSpace preInterpolationSpace, ColorSpace postInterpolationSpace, BufferPrecision bufferPrecision, ExtendMode extendMode, ColorInterpolationMode colorInterpolationMode)
Parameters
Type Name Description
DeviceContext context

The context.

GradientStop[] straightAlphaGradientStops

An array of color values and offsets.

ColorSpace preInterpolationSpace

Specifies both the input color space and the space in which the color interpolation occurs.

ColorSpace postInterpolationSpace

The color space that colors will be converted to after interpolation occurs.

BufferPrecision bufferPrecision

The precision of the texture used to hold interpolated values.

ExtendMode extendMode

Defines how colors outside of the range defined by the stop collection are determined.

ColorInterpolationMode colorInterpolationMode

The new gradient stop collection.

Returns
Type Description
GradientStopCollection1
Remarks

This method linearly interpolates between the color stops. An optional color space conversion is applied after interpolation. Whether and how this gamma conversion is applied is determined before and after interpolation. This method will fail if the device context does not support the requested buffer precision.Additional ReferencesD2D1_GRADIENT_STOP, D2D1_GAMMA_CONVERSION, BufferPrecision, ExtendMode, GradientStopCollectionRequirementsMinimum supported operating systemSame as Interface / Class Highest IRQL levelN/A (user mode) Callable from DlllMain()No Callable from services and session 0Yes Callable from UI threadYes?