Editar

Compartir a través de


SKCanvas.DrawPoints(SKPointMode, SKPoint[], SKPaint) Method

Definition

Draws an array of points, lines or a polygon in the canvas, one at a time.

public void DrawPoints (SkiaSharp.SKPointMode mode, SkiaSharp.SKPoint[] points, SkiaSharp.SKPaint paint);

Parameters

mode
SKPointMode

Determines how the points array will be interpreted: as points, as coordinates to draw lines, or as coordinates of a polygon.

points
SKPoint[]

The array of points to draw.

paint
SKPaint

The paint to use when drawing the points.

Remarks

For Points, each point is drawn centered at its coordinate, and its size is specified by the paint's stroke-width. It draws as a square, unless the paint's StrokeCap is Round, in which the points are drawn as circles.

For Lines, each pair of points is drawn as a line segment, respecting the paint's settings for cap, join and width.

For Polygon, the entire array is drawn as a series of connected line segments.

Note that, while similar, the line and polygon modes draw slightly differently than the equivalent path built with a series of move to, line to calls, in that the path will draw all of its contours at once, with no interactions if contours intersect each other (think Xor).

Applies to