ID2D1RenderTarget::CreateSolidColorBrush (constD2D1_COLOR_F&,ID2D1SolidColorBrush**) 方法 (d2d1.h)

建立新的 ID2D1SolidColorBrush ,此標識碼具有指定的色彩和 1.0f 的基底不透明度。

語法

HRESULT CreateSolidColorBrush(
  const D2D1_COLOR_F & color,
  ID2D1SolidColorBrush **solidColorBrush
);

參數

color

類型:[in] const D2D1_COLOR_F &

筆刷色彩的紅色、綠色、藍色和Alpha值。

solidColorBrush

類型:[out] ID2D1SolidColorBrush**

當這個方法傳回時,會包含新筆刷指標的位址。 這個參數會以未初始化的狀態傳遞。

傳回值

類型: 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

另請參閱

筆刷概觀

Direct2D 快速入門

ID2D1RenderTarget