ID2D1DeviceContext::CreateBitmapFromWicBitmap (IWICBitmapSource*,constD2D1_BITMAP_PROPERTIES1&,ID2D1Bitmap1**) 方法 (d2d1_1.h)

藉由複製 WIC 位圖來建立 Direct2D 點陣圖。

語法

HRESULT CreateBitmapFromWicBitmap(
  [in]                IWICBitmapSource                *wicBitmapSource,
  [in, ref, optional] const D2D1_BITMAP_PROPERTIES1 & bitmapProperties,
  [out]               ID2D1Bitmap1                    **bitmap
);

參數

[in] wicBitmapSource

類型: IWICBitmapSource*

要從中複製的 WIC 位圖來源。

[in, ref, optional] bitmapProperties

類型: const D2D1_BITMAP_PROPERTIES1

指定位圖建立選項的點陣圖屬性結構。

[out] bitmap

類型: ID2D1Bitmap1**

新建立之位圖物件的位址。

傳回值

類型: HRESULT

方法會傳回 HRESULT。 可能的值包括 (但不限於) 下表中的這些值。

HRESULT 描述
S_OK 未發生任何錯誤。
E_OUTOFMEMORY Direct2D 無法配置足夠的記憶體來完成呼叫。
E_INVALIDARG 無效的參數已傳遞至傳回函式。

規格需求

   
最低支援的用戶端 適用於 Windows 7 的 Windows 8 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 適用於 Windows Server 2008 R2 的 Windows Server 2012 和平臺更新 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 d2d1_1.h
Dll D2d1.dll

另請參閱

ID2D1DeviceContext