Back to Exoplayer

ScaleAndRotateTransformation.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/ScaleAndRotateTransformation.Builder.html

latest3.3 KB
Original Source

Package com.google.android.exoplayer2.effect

Class ScaleAndRotateTransformation.Builder


public static final classScaleAndRotateTransformation.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for ScaleAndRotateTransformation 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 | | --- | --- | --- | | ScaleAndRotateTransformation | build() | | | ScaleAndRotateTransformation.Builder | setRotationDegrees​(float rotationDegrees) | Sets the counterclockwise rotation degrees. | | ScaleAndRotateTransformation.Builder | setScale​(float scaleX, float scaleY) | Sets the x and y axis scaling factors to apply to each frame's width and height. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Creates a builder with default values.

Method Detail

- 

setScale

@CanIgnoreReturnValue
public[ScaleAndRotateTransformation.Builder](ScaleAndRotateTransformation.Builder.html "class in com.google.android.exoplayer2.effect")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[ScaleAndRotateTransformation.Builder](ScaleAndRotateTransformation.Builder.html "class in com.google.android.exoplayer2.effect")setRotationDegrees​(float rotationDegrees)

Sets the counterclockwise rotation degrees.

The default value, 0, corresponds to not applying any rotation.

The output frame's width and height are adjusted to preserve all input pixels. The rotated input frame is fitted inside an enclosing black rectangle if its edges aren't parallel to the x and y axes, to form the output frame.

Parameters:rotationDegrees - The counterclockwise rotation, in degrees.Returns:This builder.

- 

build

public[ScaleAndRotateTransformation](ScaleAndRotateTransformation.html "class in com.google.android.exoplayer2.effect")build()