# BackgroundKt

Added in 1.3.0

*** ** * ** ***


```
public final class BackgroundKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 500) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.ColorBuilders.Brush)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.Brush brush )` Sets the background brush to `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.ColorBuilders.Brush)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.types.LayoutColor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor color)` Sets the background color to `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.types.LayoutColor)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(androidx.wear.protolayout.ModifiersBuilders.Corner)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Corner corner )` Clips the element to a rounded rectangle with corners specified in `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(androidx.wear.protolayout.ModifiersBuilders.Corner)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float cornerRadius )` Clips the element to a rounded rectangle with four corners with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float)` radius. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float x, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float y )` Clips the element to a rounded shape with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float,kotlin.Float)` as the radius on the vertical axis for the four corners. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomLeft(kotlin.Float,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float x, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float y )` Clips the bottom left corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomLeft(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomLeft(kotlin.Float,kotlin.Float)` as the radius on the vertical axis. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomRight(kotlin.Float,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float x, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float y )` Clips the bottom right corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomRight(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomRight(kotlin.Float,kotlin.Float)` as the radius on the vertical axis. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopLeft(kotlin.Float,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float x, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float y )` Clips the top left corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopLeft(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopLeft(kotlin.Float,kotlin.Float)` as the radius on the vertical axis. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BackgroundKt#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopRight(kotlin.Float,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float x, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float y )` Clips the top right corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopRight(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopRight(kotlin.Float,kotlin.Float)` as the radius on the vertical axis. |

## Public methods

### background

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:background) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 500)
public static final @NonNull LayoutModifier background(
    @NonNull LayoutModifier receiver,
    @NonNull ColorBuilders.Brush brush
)
```

Sets the background brush to `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.ColorBuilders.Brush)`.

### background

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:background) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public static final @NonNull LayoutModifier background(@NonNull LayoutModifier receiver, @NonNull LayoutColor color)
```

Sets the background color to `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).background(androidx.wear.protolayout.types.LayoutColor)`.

### clip

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clip) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public static final @NonNull LayoutModifier clip(
    @NonNull LayoutModifier receiver,
    @NonNull ModifiersBuilders.Corner corner
)
```

Clips the element to a rounded rectangle with corners specified in `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(androidx.wear.protolayout.ModifiersBuilders.Corner)`.

### clip

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clip) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public static final @NonNull LayoutModifier clip(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float cornerRadius
)
```

Clips the element to a rounded rectangle with four corners with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float)` radius.

### clip

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clip) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
public static final @NonNull LayoutModifier clip(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float x,
    @Dimension(unit = 0) float y
)
```

Clips the element to a rounded shape with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clip(kotlin.Float,kotlin.Float)` as the radius on the vertical axis for the four corners.

### clipBottomLeft

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clipBottomLeft) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
public static final @NonNull LayoutModifier clipBottomLeft(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float x,
    @Dimension(unit = 0) float y
)
```

Clips the bottom left corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomLeft(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomLeft(kotlin.Float,kotlin.Float)` as the radius on the vertical axis.

### clipBottomRight

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clipBottomRight) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
public static final @NonNull LayoutModifier clipBottomRight(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float x,
    @Dimension(unit = 0) float y
)
```

Clips the bottom right corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomRight(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipBottomRight(kotlin.Float,kotlin.Float)` as the radius on the vertical axis.

### clipTopLeft

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clipTopLeft) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
public static final @NonNull LayoutModifier clipTopLeft(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float x,
    @Dimension(unit = 0) float y
)
```

Clips the top left corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopLeft(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopLeft(kotlin.Float,kotlin.Float)` as the radius on the vertical axis.

### clipTopRight

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Background.kt+function:clipTopRight) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
public static final @NonNull LayoutModifier clipTopRight(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float x,
    @Dimension(unit = 0) float y
)
```

Clips the top right corner of the element with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopRight(kotlin.Float,kotlin.Float)` as the radius on the horizontal axis and `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/package-summary#(androidx.wear.protolayout.modifiers.LayoutModifier).clipTopRight(kotlin.Float,kotlin.Float)` as the radius on the vertical axis.