Share via


Path.Approximate(Single) Method

Definition

Approximate the Path with a series of line segments.

[Android.Runtime.Register("approximate", "(F)[F", "GetApproximate_FHandler", ApiSince=26)]
public virtual float[] Approximate (float acceptableError);
[<Android.Runtime.Register("approximate", "(F)[F", "GetApproximate_FHandler", ApiSince=26)>]
abstract member Approximate : single -> single[]
override this.Approximate : single -> single[]

Parameters

acceptableError
Single

The acceptable error for a line on the Path. Typically this would be 0.5 so that the error is less than half a pixel.

Returns

Single[]

An array of components for points approximating the Path.

Attributes

Remarks

Approximate the Path with a series of line segments. This returns float[] with the array containing point components. There are three components for each point, in order: <ul> <li>Fraction along the length of the path that the point resides</li> <li>The x coordinate of the point</li> <li>The y coordinate of the point</li> </ul>

Two points may share the same fraction along its length when there is a move action within the Path.

Java documentation for android.graphics.Path.approximate(float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to