---
title: "drawIntoCanvas"
description: "Provides access to draw directly with the underlying [Canvas]. This is helpful for situations to
re-use alternative drawing logic in combination with [DrawScope]"
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
inline fun DrawScope.drawIntoCanvas(block: (Canvas) -> Unit) = block(drawContext.canvas)
```


Provides access to draw directly with the underlying `Canvas`. This is helpful for situations to
re-use alternative drawing logic in combination with `DrawScope`

#### Parameters

| | |
| --- | --- |
| block | Lambda callback to issue drawing commands on the provided `Canvas` |




