共用方式為


CD2DGeometry::ComputeLength

Calculates the length of the geometry as though each segment were unrolled into a line.

BOOL ComputeLength(
   const D2D1_MATRIX_3X2_F& worldTransform,
   FLOAT& length,
   FLOAT flatteningTolerance = D2D1_DEFAULT_FLATTENING_TOLERANCE
) const;

Parameters

  • worldTransform
    The transform to apply to the geometry before calculating its length.

  • length
    When this method returns, contains a pointer to the length of the geometry. For closed geometries, the length includes an implicit closing segment. You must allocate storage for this parameter.

  • flatteningTolerance
    The maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.

Return Value

If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.

Requirements

Header: afxrendertarget.h

See Also

Reference

CD2DGeometry Class