---
title: "GraphicsContext"
description: "Create a new [GraphicsContext] with the provided [ViewGroup] to contain [View] based layers."
type: "function"
---

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


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


```kotlin
fun GraphicsContext(layerContainer: ViewGroup): GraphicsContext
```


Create a new `GraphicsContext` with the provided `ViewGroup` to contain `View` based layers.

#### Parameters

| | |
| --- | --- |
| layerContainer | `ViewGroup` used to contain `View` based layers that are created by the returned `GraphicsContext` |




