---
title: "PointMode"
description: "Used by [Canvas.drawPoints]."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
value class PointMode internal constructor(@Suppress("unused") private val value: Int)
```


Used by `Canvas.drawPoints`.


## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Points = PointMode(0)
```


Draw each point separately.

If the `Paint.strokeCap` is `StrokeCap.Round`, then each point is drawn as a circle with
the diameter of the `Paint.strokeWidth`, filled as described by the `Paint` (ignoring
`Paint.style`).

Otherwise, each point is drawn as an axis-aligned square with sides of length
`Paint.strokeWidth`, filled as described by the `Paint` (ignoring `Paint.style`).



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Lines = PointMode(1)
```


Draw each sequence of two points as a line segment.

If the number of points is odd, then the last point is ignored.

The lines are stroked as described by the `Paint` (ignoring `Paint.style`).



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Polygon = PointMode(2)
```


Draw the entire sequence of point as one line.

The lines are stroked as described by the `Paint` (ignoring `Paint.style`).





