---
title: "CanvasHolder"
description: "Holder class that is used to issue scoped calls to a [Canvas] from the framework equivalent
canvas without having to allocate an object on each draw call"
type: "class"
---

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


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

<div class='sourceset sourceset-android'>Android</div>


```kotlin
class CanvasHolder
```


Holder class that is used to issue scoped calls to a `Canvas` from the framework equivalent
canvas without having to allocate an object on each draw call


## Functions

```kotlin
inline fun drawInto(targetCanvas: android.graphics.Canvas, block: Canvas.() -> Unit)
```


