drawPolygon

fun drawPolygon(coords: Array<Point>, paint: Paint): Canvas
fun drawPolygon(coords: FloatArray, paint: Paint): Canvas

Draws pts using clip, Matrix and Paint paint.

Each adjacent pair of points draws a line segment. count minus one lines are drawn; the first and last point are used once.

Each line segment respects paint PaintStrokeCap and Paint stroke width. PaintMode is ignored, as if were set to PaintMode.STROKE.

Always draws each element one at a time; is not affected by PaintStrokeJoin, and unlike drawPath(), does not create a mask from all points and lines before drawing.

Parameters

coords

array of points to draw

paint

stroke, blend, color, and so on, used to draw

See also