ID2D1RenderTarget::Clear (constD2D1_COLOR_F*) 方法 (d2d1.h)

將繪圖區域清除為指定的色彩。

語法

void Clear(
  const D2D1_COLOR_F *clearColor
);

參數

clearColor

Type: [in, optional] const D2D1_COLOR_F*

清除繪圖區域的色彩,或透明黑色的 Null

傳回值

備註

Direct2D 會將 clearColor 解譯為直接 Alpha (非預乘) 。 如果轉譯目標的 Alpha 模式 D2D1_ALPHA_MODE_IGNORE則會忽略 clearColor 的 Alpha 色板,並以 1.0f 取代 (完全不透明) 。

如果轉譯目標具有 PushAxisAlignedClip 所指定的使用中剪輯 () ,則清除命令只會套用至剪輯區域內的區域。

規格需求

   
最低支援的用戶端 適用于 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

另請參閱

ID2D1RenderTarget