Table of Contents

Method GetPathFromSystemPoints

Namespace
Alternet.Skia
Assembly
Alternet.UI.Common.dll

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

points ReadOnlySpan<Point>

A read-only span of Point representing the vertices of the path. Must contain at least three points to create a valid path.

fillMode SkiaFillMode

The 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 points span 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.