<div class='sourceset sourceset-android'>Android</div>

```kotlin
public interface Horizontal
```

An interface to calculate the position of a box of a certain width inside an available width.

## Functions

<h2 id="offset-width-space-layoutdirection">offset</h2>

```kotlin
public fun offset(
            width: Int,
            space: Int,
            layoutDirection: LayoutDirection = LayoutDirection.Ltr,
        ): Int
```

Provides the horizontal offset from the origin of the space to the origin of the content.

#### Parameters

| | |
| --- | --- |
| width | The content width in pixels. |
| space | The available space in pixels. |
| layoutDirection | LTR or RTL. |