---
title: "toAndroidVertexMode"
description: ""
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
fun VertexMode.toAndroidVertexMode() =
    when (this) {
        VertexMode.Triangles -> android.graphics.Canvas.VertexMode.TRIANGLES
        VertexMode.TriangleStrip -> android.graphics.Canvas.VertexMode.TRIANGLE_STRIP
        VertexMode.TriangleFan -> android.graphics.Canvas.VertexMode.TRIANGLE_FAN
        else -> android.graphics.Canvas.VertexMode.TRIANGLES
    }
```


