ImmutableAffineTransform.Companion


public static class ImmutableAffineTransform.Companion


Summary

Public methods

static final @NonNull ImmutableAffineTransform

Returns a transformation that rotates degrees in the direction from the positive x-axis towards the positive y-axis.

static final @NonNull ImmutableAffineTransform
scale(float scaleFactor)

Returns a transformation that scales in both the x- and y-direction by the given scaleFactor, centered about the origin.

static final @NonNull ImmutableAffineTransform
scale(float xScaleFactor, float yScaleFactor)

Returns a transformation that scales in both the x- and y-direction by the given pair of factors; xScaleFactor and yScaleFactor respectively, centered about the origin.

static final @NonNull ImmutableAffineTransform
scaleX(float scaleFactor)

Returns a transformation that scales in the x-direction by the given factor, centered about the origin.

static final @NonNull ImmutableAffineTransform
scaleY(float scaleFactor)

Returns a transformation that scales in the y-direction by the given factor, centered about the origin.

static final @NonNull ImmutableAffineTransform
skewX(float sx)

Returns a transformation that skews in the x-direction by the given factor.

static final @NonNull ImmutableAffineTransform
skewY(float sy)

Returns a transformation that skews in the y-direction by the given factor.

static final @NonNull ImmutableAffineTransform

Returns a transformation that translates by the given offset vector.

Extension functions

static final ImmutableAffineTransform

Constructs an ImmutableAffineTransform with the values from matrix.

Public methods

rotateDegrees

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform rotateDegrees(@AngleDegreesFloat float degrees)

Returns a transformation that rotates degrees in the direction from the positive x-axis towards the positive y-axis.

scale

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform scale(float scaleFactor)

Returns a transformation that scales in both the x- and y-direction by the given scaleFactor, centered about the origin.

scale

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform scale(float xScaleFactor, float yScaleFactor)

Returns a transformation that scales in both the x- and y-direction by the given pair of factors; xScaleFactor and yScaleFactor respectively, centered about the origin.

scaleX

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform scaleX(float scaleFactor)

Returns a transformation that scales in the x-direction by the given factor, centered about the origin.

scaleY

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform scaleY(float scaleFactor)

Returns a transformation that scales in the y-direction by the given factor, centered about the origin.

skewX

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform skewX(float sx)

Returns a transformation that skews in the x-direction by the given factor.

skewY

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform skewY(float sy)

Returns a transformation that skews in the y-direction by the given factor.

translate

Added in 1.0.0-alpha07
public static final @NonNull ImmutableAffineTransform translate(@NonNull Vec offset)

Returns a transformation that translates by the given offset vector.

Extension functions

AndroidGraphicsConverter.from

public static final ImmutableAffineTransform AndroidGraphicsConverter.from(
    @NonNull ImmutableAffineTransform.Companion receiver,
    @NonNull Matrix matrix
)

Constructs an ImmutableAffineTransform with the values from matrix.

If matrix is not an affine transform, returns null instead.

Performance-sensitive code should use the populateFrom overload that takes a pre-allocated MutableAffineTransform, so that the instance can be reused across multiple calls.

Java callers should prefer AndroidGraphicsConverter.createAffineTransform(Matrix) (createAffineTransform).