# ID2D1Geometry::ComputePointAtLength(FLOAT,constD2D1_MATRIX_3X2_F&,FLOAT,D2D1_POINT_2F*,D2D1_POINT_2F*) method (d2d1.h)

Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.

## Syntax

``````HRESULT ComputePointAtLength(
FLOAT                     length,
const D2D1_MATRIX_3X2_F & worldTransform,
FLOAT                     flatteningTolerance,
D2D1_POINT_2F             *point,
D2D1_POINT_2F             *unitTangentVector
);
``````

## Parameters

`length`

Type: [in] FLOAT

The distance along the geometry of the point and tangent to find. If this distance is less than 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.

`worldTransform`

Type: [in] const D2D1_MATRIX_3X2_F &

The transform to apply to the geometry before calculating the specified point and tangent.

`flatteningTolerance`

Type: [in] FLOAT

The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.

`point`

Type: [out, optional] D2D1_POINT_2F*

The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.

`unitTangentVector`

Type: [out, optional] D2D1_POINT_2F*

When this method returns, contains a pointer to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.

## Return value

Type: HRESULT

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

## Requirements

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