ID2D1PathGeometry1::ComputePointAndSegmentAtLength(FLOAT,UINT32,constD2D1_MATRIX_3X2_F*,D2D1_POINT_DESCRIPTION*) method (d2d1_1.h)

Computes the point that exists at a given distance along the path geometry along with the index of the segment the point is on and the directional vector at that point.

Syntax

HRESULT ComputePointAndSegmentAtLength(
                 FLOAT                   length,
                 UINT32                  startSegment,
  [in, optional] const D2D1_MATRIX_3X2_F *worldTransform,
  [out]          D2D1_POINT_DESCRIPTION  *pointDescription
);

Parameters

length

Type: FLOAT

The distance to walk along the path.

startSegment

Type: UINT32

The index of the segment at which to begin walking. Note: This index is global to the entire path, not just a particular figure.

[in, optional] worldTransform

Type: const D2D1_MATRIX_3X2_F*

The transform to apply to the path prior to walking.

[out] pointDescription

Type: D2D1_POINT_DESCRIPTION*

When this method returns, contains a description of the point that can be found at the given location.

Return value

Type: HRESULT

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

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG One of the inputs was in an invalid range.

Requirements

Requirement Value
Target Platform Windows
Header d2d1_1.h (include D2d1_1.h)
Library D2d1_3.lib
DLL D2d1_3.dll

See also

ID2D1PathGeometry1