---
title: "GraphicsContext"
description: "Class responsible for providing graphics related dependencies. This includes the creation and
management of [GraphicsLayer] instances."
type: "interface"
---

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


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

<div class='sourceset sourceset-common'>Common</div>



```kotlin
interface GraphicsContext
```


Class responsible for providing graphics related dependencies. This includes the creation and
management of `GraphicsLayer` instances.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val shadowContext: ShadowContext
```


Returns a `ShadowContext` instance used to obtain shared dependencies to render drop and
inner shadows



## Functions

```kotlin
fun createGraphicsLayer(): GraphicsLayer
```


Create a `GraphicsLayer` instance. This may internally return a previously released
`GraphicsLayer` instance passed to `releaseGraphicsLayer`


```kotlin
fun releaseGraphicsLayer(layer: GraphicsLayer)
```


Releases a `GraphicsLayer` instance so it can be re-used. After this method is invoked, it is
an error to use this `GraphicsLayer` instance again. The `GraphicsLayer` maybe reused
internally and obtained again through a subsequent call to `createGraphicsLayer`



