Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1DeviceContext1::CreateStrokedGeometryRealization method

Creates a device-dependent representation of the stroke of a geometry that can be subsequently rendered.

Syntax


HRESULT CreateStrokedGeometryRealization(
  [in]           ID2D1Geometry            *geometry,
                 FLOAT                    flatteningTolerance,
                 FLOAT                    strokeWidth,
  [in, optional] ID2D1StrokeStyle         *strokeStyle,
  [out]          ID2D1GeometryRealization **geometryRealization
);

Parameters

geometry [in]

Type: ID2D1Geometry*

The geometry to realize.

flatteningTolerance

Type: FLOAT

The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.

strokeWidth

Type: FLOAT

The width of the stroke. This parameter shares the same units as the coordinates of the geometry.

strokeStyle [in, optional]

Type: ID2D1StrokeStyle*

The stroke style (optional).

geometryRealization [out]

Type: ID2D1GeometryRealization**

When this method returns, contains the address of a pointer to a new geometry realization object.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid value was passed to the method.

 

Remarks

This method is used in conjunction with ID2D1DeviceContext1::DrawGeometryRealization. The D2D1::ComputeFlatteningTolerance helper API may be used to determine the proper flattening tolerance.

If the provided stroke style specifies a stroke transform type other than D2D1_STROKE_TRANSFORM_TYPE_NORMAL, then the stroke will be realized assuming the identity transform and a DPI of 96.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_2.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1DeviceContext1

 

 

Show:
© 2017 Microsoft