ID2D1Factory::CreateStrokeStyle(constD2D1_STROKE_STYLE_PROPERTIES*,constFLOAT*,UINT32,ID2D1StrokeStyle**) method (d2d1.h)

Creates an ID2D1StrokeStyle that describes start cap, dash pattern, and other features of a stroke.

Syntax

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

Parameters

[in] strokeStyleProperties

Type: const D2D1_STROKE_STYLE_PROPERTIES*

A structure that describes the stroke's line cap, dash offset, and other details of a stroke.

[in, optional] dashes

Type: const FLOAT*

An array whose elements are set to the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. The length of each dash and space in the dash pattern is the product of the element value in the array and the stroke width.

dashesCount

Type: UINT

The number of elements in the dashes array.

[out] strokeStyle

Type: ID2D1StrokeStyle**

When this method returns, contains the address of the pointer to the stroke style created by this method.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h
Library D2d1.lib
DLL D2d1.dll

See also

ID2D1Factory