---
title: "drawWithContent"
description: "Creates a [DrawModifier] that allows the developer to draw before or after the layout's contents.
It also allows the modifier to adjust the layout's canvas."
type: "modifier"
---

<div class='type'>Compose Modifier</div>

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


```kotlin
fun Modifier.drawWithContent(onDraw: ContentDrawScope.() -> Unit): Modifier
```


Creates a `DrawModifier` that allows the developer to draw before or after the layout's contents.
It also allows the modifier to adjust the layout's canvas.



