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

创建一个 ID2D1StrokeStyle,该 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 7、带 SP2 的 Windows Vista 和适用于 Windows Vista 的平台更新 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows Server 2008 R2、Windows Server 2008 SP2 和适用于 Windows Server 2008 的平台更新 [桌面应用 |UWP 应用]
目标平台 Windows
标头 d2d1.h
Library D2d1.lib
DLL D2d1.dll

另请参阅

ID2D1Factory