---
title: "VertexMode"
description: "Defines how a list of points is interpreted when drawing a set of triangles.

Used by [Canvas.drawVertices]."
type: "class"
---

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


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

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


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


Defines how a list of points is interpreted when drawing a set of triangles.

Used by `Canvas.drawVertices`.


## Companion Object

#### Properties

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


```kotlin
val Triangles = VertexMode(0)
```


Draw each sequence of three points as the vertices of a triangle.



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


```kotlin
val TriangleStrip = VertexMode(1)
```


Draw each sliding window of three points as the vertices of a triangle.



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


```kotlin
val TriangleFan = VertexMode(2)
```


Draw the first point and each sliding window of two points as the vertices of a triangle.





