ID2D1GradientStopCollection::GetGradientStops 方法 (d2d1.h)

將集合中的漸層停駐點複製到 D2D1_GRADIENT_STOP 結構的陣列。

語法

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

參數

[out] gradientStops

類型: D2D1_GRADIENT_STOP*

D2D1_GRADIENT_STOP 結構的一 維陣列指標。 當這個方法傳回時,陣列會包含集合漸層停駐點的複本。 您必須為此陣列配置記憶體。

gradientStopsCount

類型: UINT

值,指出要複製的漸層停駐點數目。 如果值小於集合中的漸層停駐點數目,則會省略其餘的漸層停駐點。 如果值大於集合中的漸層停駐點數目,則額外的漸層停駐點會設定為 Null。 若要取得集合中的漸層停駐點數目,請使用 GetGradientStopCount 方法。

傳回值

備註

漸層停駐點會依位置順序複製,從具有最小位置值的漸層停駐點開始,並進度到具有最大位置值的漸層停駐點。

規格需求

   
最低支援的用戶端 適用于 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 d2d1.h
程式庫 D2d1.lib
Dll D2d1.dll

另請參閱

ID2D1GradientStopCollection