Method ComputeLength
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
ComputeLength(in Matrix3x2Float?, float?)
Calculates the length of the geometry as though each segment were unrolled into a line.
float ComputeLength(in Matrix3x2Float? worldTransform = null, float? flatteningTolerance = null)
Parameters
worldTransform
Matrix3x2Float?The transform to apply to the geometry before calculating its length, 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.
Returns
- float
Returns the length of the geometry. For closed geometries, the length includes an implicit closing segment.