Method ComputePointAtLength
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
ComputePointAtLength(float, in Matrix3x2Float?, float?, out Vector2Float)
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.
Point2Float ComputePointAtLength(float length, in Matrix3x2Float? worldTransform, float? flatteningTolerance, out Vector2Float unitTangentVector)
Parameters
length
floatThe 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
Matrix3x2Float?The transform to apply to the geometry before calculating the specified point and tangent, or null for no transform.
flatteningTolerance
float?The maximum error allowed when constructing a polygonal approximation of the geometry, or null to use FlatteningTolerance.Default. 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.
unitTangentVector
Vector2FloatOn return, contains 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.
Returns
- Point2Float
Returns the location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.