ID2D1RenderTarget::CreateLinearGradientBrush (constD2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES&,constD2D1_BRUSH_PROPERTIES&,ID2D1GradientStopCollection*,ID2D1LinearGradientBrush**) 方法 (d2d1.h)
建立 ID2D1LinearGradientBrush ,其中包含指定的漸層停駐點,並具有指定的轉換和基底不透明度。
語法
HRESULT CreateLinearGradientBrush(
const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES & linearGradientBrushProperties,
const D2D1_BRUSH_PROPERTIES & brushProperties,
ID2D1GradientStopCollection *gradientStopCollection,
ID2D1LinearGradientBrush **linearGradientBrush
);
參數
linearGradientBrushProperties
類型:[in] const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &
漸層的起點和終點。
brushProperties
類型:[in] const D2D1_BRUSH_PROPERTIES &
新筆刷的轉換和基底不透明度。
gradientStopCollection
類型: [in] ID2D1GradientStopCollection*
描述筆刷漸層色彩及其沿著漸層線條位置的 D2D1_GRADIENT_STOP 結構集合。
linearGradientBrush
類型: [out] ID2D1LinearGradientBrush**
當這個方法傳回時,會包含新筆刷指標的位址。 這個參數會以未初始化的狀態傳遞。
傳回值
類型: HRESULT
如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 | 適用於 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 |
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應