Method GetPathFromSystemPoints
GetPathFromSystemPoints(ReadOnlySpan<Point>, SkiaFillMode)
Creates a new SKPath from a collection of drawing points, optionally specifying the fill mode.
public static SKPath? GetPathFromSystemPoints(ReadOnlySpan<Point> points, SkiaFillMode fillMode = SkiaFillMode.Alternate)
Parameters
pointsReadOnlySpan<Point>A read-only span of Point representing the vertices of the path. Must contain at least three points to create a valid path.
fillModeSkiaFillModeThe fill mode to use for the path. Defaults to Alternate.
Returns
- SKPath
An SKPath representing the closed polygon defined by the provided points, or null if the
pointsspan is empty or contains fewer than three points.
Remarks
The method creates a closed path by connecting the points in the order they appear in
the span, and then closing the path to form a polygon. The fillMode
determines how the
interior of the polygon is filled.