Class ScaleToFitTransformation.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.effect.ScaleToFitTransformation.Builder
-
- Enclosing class:
- ScaleToFitTransformation
public static final class ScaleToFitTransformation.Builder extends Object
A builder forScaleToFitTransformation
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a builder with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleToFitTransformation
build()
ScaleToFitTransformation.Builder
setRotationDegrees(float rotationDegrees)
Sets the counterclockwise rotation degrees.ScaleToFitTransformation.Builder
setScale(float scaleX, float scaleY)
Sets the x and y axis scaling factors to apply to each frame's width and height.
-
-
-
Method Detail
-
setScale
@CanIgnoreReturnValue public ScaleToFitTransformation.Builder setScale(float scaleX, float scaleY)
Sets the x and y axis scaling factors to apply to each frame's width and height.The values default to 1, which corresponds to not scaling along both axes.
- Parameters:
scaleX
- The multiplier by which the frame will scale horizontally, along the x-axis.scaleY
- The multiplier by which the frame will scale vertically, along the y-axis.- Returns:
- This builder.
-
setRotationDegrees
@CanIgnoreReturnValue public ScaleToFitTransformation.Builder setRotationDegrees(float rotationDegrees)
Sets the counterclockwise rotation degrees.The default value, 0, corresponds to not applying any rotation.
- Parameters:
rotationDegrees
- The counterclockwise rotation, in degrees.- Returns:
- This builder.
-
build
public ScaleToFitTransformation build()
-
-