ImmutableAffineTransform.Companion
public static class ImmutableAffineTransform.Companion
Summary
Public methods |
|
|---|---|
static final @NonNull ImmutableAffineTransform |
rotateDegrees(@AngleDegreesFloat float degrees)Returns a transformation that rotates |
static final @NonNull ImmutableAffineTransform |
scale(float scaleFactor)Returns a transformation that scales in both the x- and y-direction by the given |
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; |
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 |
Extension functions |
|
|---|---|
static final ImmutableAffineTransform |
AndroidGraphicsConverter.from(Constructs an |
Public methods
rotateDegrees
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
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
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
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
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
public static final @NonNull ImmutableAffineTransform skewX(float sx)
Returns a transformation that skews in the x-direction by the given factor.
skewY
public static final @NonNull ImmutableAffineTransform skewY(float sy)
Returns a transformation that skews in the y-direction by the given factor.
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).