public final class

CompositionSettings.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.CompositionSettings.Builder

Overview

A builder for CompositionSettings instances.

Summary

Constructors
publicBuilder()

Creates a new CompositionSettings.Builder.

Methods
public CompositionSettingsbuild()

Builds the CompositionSettings.

public CompositionSettings.BuildersetAlpha(float alpha)

Sets the alpha.

public CompositionSettings.BuildersetOffset(float offsetX, float offsetY)

Sets the offset.

public CompositionSettings.BuildersetScale(float scaleX, float scaleY)

Sets the scale.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a new CompositionSettings.Builder.

The default alpha is 1.0f, the default offset is (0.0f, 0.0f), the default scale is (1.0f, 1.0f).

Methods

public CompositionSettings.Builder setAlpha(float alpha)

Sets the alpha. 0 means fully transparent, 1 means fully opaque.

Parameters:

alpha: alpha value.

Returns:

Builder instance.

public CompositionSettings.Builder setOffset(float offsetX, float offsetY)

Sets the offset.

Parameters:

offsetX: offset X value.
offsetY: offset Y value.

Returns:

Builder instance.

public CompositionSettings.Builder setScale(float scaleX, float scaleY)

Sets the scale.

Parameters:

scaleX: scale X value.
scaleY: scale Y value.

Returns:

Builder instance.

public CompositionSettings build()

Builds the CompositionSettings.

Returns:

CompositionSettings.