ID2D1GradientStopCollection1::GetGradientStops1 方法 (d2d1_1.h)

将渐变停止点从集合复制到内存中。

语法

void GetGradientStops1(
  [out] D2D1_GRADIENT_STOP *gradientStops,
        UINT32             gradientStopsCount
);

参数

[out] gradientStops

类型: D2D1_GRADIENT_STOP*

此方法返回时,包含指向 D2D1_GRADIENT_STOP 结构的一维数组的指针。

gradientStopsCount

类型: UINT

要复制的渐变停止数。

返回值

备注

如果 ID2D1DeviceContext::CreateGradientStopCollection,则此方法返回在创建方法中指定的相同值。 如果 ID2D1GradientStopCollection1 对象是使用 ID2D1RenderTarget::CreateGradientStopCollection 创建的,则此处返回的停止点将首先转换为 由 colorInterpolationGamma 参数指定的伽玛空间。 有关颜色空间和伽玛空间的详细信息,请参阅 ID2D1DeviceContext::CreateGradientStopCollection 方法。

如果 gradientStopsCount 小于集合中的渐变停止点数,则省略剩余的渐变停止点。 如果 gradientStopsCount 大于集合中的渐变停止点数,则额外的渐变停止点将设置为 NULL。 若要获取集合中的渐变停止点数,请使用 GetGradientStopCount 方法。

要求

   
最低受支持的客户端 适用于 Windows 7 的 Windows 8 和平台更新 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows Server 2012 和适用于 Windows Server 2008 R2 的平台更新 [桌面应用 |UWP 应用]
目标平台 Windows
标头 d2d1_1.h
DLL D2d1.dll

另请参阅

ID2D1DeviceContext::CreateEffect

ID2D1DeviceContext::CreateGradientStopCollection

ID2D1GradientStopCollection1

ID2D1RenderTarget::CreateGradientStopCollection