# PointMode

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PointMode.kt+class:androidx.compose.ui.graphics.PointMode) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  value class PointMode
  ```

*** ** * ** ***

Used by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas#drawPoints(androidx.compose.ui.graphics.PointMode,kotlin.collections.List,androidx.compose.ui.graphics.Paint)`.

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode#Lines()` Draw each sequence of two points as a line segment. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode#Points()` Draw each point separately. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode#Polygon()` Draw the entire sequence of point as one line. | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode#toString()()` | Cmn |

## Public companion properties

### Lines

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val Lines: PointMode
```

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 `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint` (ignoring `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#style()`).

### Points

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val Points: PointMode
```

Draw each point separately.

If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#strokeCap()` is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap#Round()`, then each point is drawn as a circle with the diameter of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#strokeWidth()`, filled as described by the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint` (ignoring `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#style()`).

Otherwise, each point is drawn as an axis-aligned square with sides of length `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#strokeWidth()`, filled as described by the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint` (ignoring `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#style()`).

### Polygon

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val Polygon: PointMode
```

Draw the entire sequence of point as one line.

The lines are stroked as described by the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint` (ignoring `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#style()`).

## Public functions

### toString

Cmn

```
open fun toString(): String
```