ScaleAndRotateTransformation.Builder


class ScaleAndRotateTransformation.Builder


A builder for ScaleAndRotateTransformation instances.

Summary

Public constructors

Creates a builder with default values.

Public functions

ScaleAndRotateTransformation!
ScaleAndRotateTransformation.Builder!

Sets the counterclockwise rotation degrees.

ScaleAndRotateTransformation.Builder!

Sets the x and y axis scaling factors to apply to each frame's width and height.

Public constructors

Builder

Builder()

Creates a builder with default values.

Public functions

setRotationDegrees

@CanIgnoreReturnValue
fun setRotationDegrees(rotationDegrees: Float): ScaleAndRotateTransformation.Builder!

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: Float

The counterclockwise rotation, in degrees.

Returns
ScaleAndRotateTransformation.Builder!

This builder.

setScale

@CanIgnoreReturnValue
fun setScale(scaleX: Float, scaleY: Float): ScaleAndRotateTransformation.Builder!

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: Float

The multiplier by which the frame will scale horizontally, along the x-axis.

scaleY: Float

The multiplier by which the frame will scale vertically, along the y-axis.

Returns
ScaleAndRotateTransformation.Builder!

This builder.