ID2D1Factory::CreateStrokeStyle (constD2D1_STROKE_STYLE_PROPERTIES&,constFLOAT*,UINT32,ID2D1StrokeStyle**) 方法 (d2d1.h)

建立 ID2D1StrokeStyle ,描述筆劃的開始上限、虛線圖樣和其他功能。

語法

HRESULT CreateStrokeStyle(
  [ref]          const D2D1_STROKE_STYLE_PROPERTIES & strokeStyleProperties,
  [in, optional] const FLOAT                          *dashes,
                 UINT32                               dashesCount,
  [out]          ID2D1StrokeStyle                     **strokeStyle
);

參數

[ref] strokeStyleProperties

類型: const D2D1_STROKE_STYLE_PROPERTIES

結構,描述筆劃的線條上限、虛線位移,以及筆劃的其他詳細數據。

[in, optional] dashes

類型: const FLOAT*

陣列,其元素會設定為虛線圖樣中每個虛線和空格的長度。 第一個項目會設定虛線的長度、第二個項目設定空格的長度、第三個專案設定虛線的長度等等。 虛線圖樣中每個虛線和空格的長度是陣列中專案值和筆劃寬度的乘積。

dashesCount

類型: UINT

虛線陣列中的元素數目。

[out] strokeStyle

類型: ID2D1StrokeStyle**

當這個方法傳回時,會包含這個方法所建立之筆劃樣式的指標位址。

傳回值

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

另請參閱

ID2D1Factory