# StaticOverlaySettings.Builder

Artifact: [androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/effect/StaticOverlaySettings.java+class:androidx.media3.effect.StaticOverlaySettings.Builder)

*** ** * ** ***


```
public final class StaticOverlaySettings.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#Builder()()` Creates a new `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder`. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings` | `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#build()()` Creates an instance of `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings`, using defaults if values are unset. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setAlphaScale(float)(@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0) float alphaScale)` Sets the alpha scale value of the overlay, altering its translucency. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setBackgroundFrameAnchor(float,float)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-1", to = 1) float x, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-1", to = 1) float y )` Sets the coordinates for the anchor point of the overlay within the background frame. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setHdrLuminanceMultiplier(float)(float hdrLuminanceMultiplier)` Set the luminance multiplier of an SDR overlay when overlaid on a HDR frame. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setOverlayFrameAnchor(float,float)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-1", to = 1) float x, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-1", to = 1) float y )` Sets the coordinates for the anchor point within the overlay. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setRotationDegrees(float)(float rotationDegree)` Sets the rotation of the overlay, counter-clockwise. |
| `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder#setScale(float,float)(float x, float y)` Sets the scaling of the overlay. |

## Public constructors

### Builder

```
public Builder()
```

Creates a new `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings.Builder`.

## Public methods

### build

```
public StaticOverlaySettings build()
```

Creates an instance of `https://developer.android.com/reference/androidx/media3/effect/StaticOverlaySettings`, using defaults if values are unset.

### setAlphaScale

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setAlphaScale(@FloatRange(from = 0) float alphaScale)
```

Sets the alpha scale value of the overlay, altering its translucency.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getAlphaScale()` |   |

### setBackgroundFrameAnchor

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setBackgroundFrameAnchor(
    @FloatRange(from = "-1", to = 1) float x,
    @FloatRange(from = "-1", to = 1) float y
)
```

Sets the coordinates for the anchor point of the overlay within the background frame.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getBackgroundFrameAnchor()` |   |

### setHdrLuminanceMultiplier

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setHdrLuminanceMultiplier(float hdrLuminanceMultiplier)
```

Set the luminance multiplier of an SDR overlay when overlaid on a HDR frame.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getHdrLuminanceMultiplier()` |   |

### setOverlayFrameAnchor

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setOverlayFrameAnchor(
    @FloatRange(from = "-1", to = 1) float x,
    @FloatRange(from = "-1", to = 1) float y
)
```

Sets the coordinates for the anchor point within the overlay.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getOverlayFrameAnchor()` |   |

### setRotationDegrees

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setRotationDegrees(float rotationDegree)
```

Sets the rotation of the overlay, counter-clockwise.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getRotationDegrees()` |   |

### setScale

```
@CanIgnoreReturnValue
public StaticOverlaySettings.Builder setScale(float x, float y)
```

Sets the scaling of the overlay.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/OverlaySettings#getScale()` |   |