ID2D1Geometry::ComputePointAtLength method

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


virtual HRESULT ComputePointAtLength(
                        FLOAT             length,
  [in, optional]  const D2D1_MATRIX_3X2_F *worldTransform,
                        FLOAT             flatteningTolerance,
  [out, optional]       D2D1_POINT_2F     *point,
  [out, optional]       D2D1_POINT_2F     *unitTangentVector
) const = 0;

Parameters

length

Type: FLOAT

The distance along the geometry of the point and tangent to find. If this distance is less then 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 [in, optional]

Type: const D2D1_MATRIX_3X2_F*

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

flatteningTolerance

Type: 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 [out, optional]

Type: 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 [out, optional]

Type: 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]

Minimum supported phone

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

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1Geometry

 

 

Show: