<h2 id="overload-1">Overload 1</h2>

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

```kotlin
fun interface MarqueeSpacing
```

Defines a `calculateSpacing` method that determines the space after the end of [basicMarquee](/jetpack-compose/androidx.compose.foundation/foundation/modifiers/basicMarquee)
content before drawing the content again.

## Functions

<hr class="docs-overload-divider">

<h2 id="calculatespacing-contentwidth-containerwidth">calculateSpacing</h2>

```kotlin
fun Density.calculateSpacing(contentWidth: Int, containerWidth: Int): Int
```

Calculates the space after the end of [basicMarquee](/jetpack-compose/androidx.compose.foundation/foundation/modifiers/basicMarquee) content before drawing the content
again.

This is a restartable method: any state used to calculate the result will cause the spacing
to be re-calculated when it changes.

#### Parameters

| | |
| --- | --- |
| contentWidth | The width of the content inside the marquee, in pixels. Will always be larger than `containerWidth`. |
| containerWidth | The width of the marquee itself, in pixels. Will always be smaller than `contentWidth`. |

#### Returns

| | |
| --- | --- |
|  | The space in pixels between the end of the content and the beginning of the content when wrapping. |