Transformation
open class Transformation
kotlin.Any | |
↳ | android.view.animation.Transformation |
Defines the transformation to be applied at one point in time of an Animation.
Summary
Constants | |
---|---|
static Int |
Indicates a transformation that applies an alpha only (uses an identity matrix.) |
static Int |
Indicates a transformation that applies an alpha and a matrix. |
static Int |
Indicates a transformation that has no effect (alpha = 1 and identity matrix.) |
static Int |
Indicates a transformation that applies a matrix only (alpha = 1.) |
Public constructors | |
---|---|
Creates a new transformation with alpha = 1 and the identity matrix. |
Public methods | |
---|---|
open Unit |
clear() Reset the transformation to a state that leaves the object being animated in an unmodified state. |
open Unit |
compose(t: Transformation!) Apply this Transformation to an existing Transformation, e. |
open Float |
getAlpha() |
open Matrix! | |
open Int |
Indicates the nature of this transformation. |
open Unit |
set(t: Transformation!) Clones the specified transformation. |
open Unit |
Sets the degree of transparency |
open Unit |
setTransformationType(transformationType: Int) Sets the transformation type. |
open String! |
Return a string representation of the transformation in a compact form. |
open String |
toString() |
Properties | |
---|---|
Float | |
Matrix! | |
Int |
Constants
TYPE_ALPHA
static val TYPE_ALPHA: Int
Indicates a transformation that applies an alpha only (uses an identity matrix.)
Value: 1
TYPE_BOTH
static val TYPE_BOTH: Int
Indicates a transformation that applies an alpha and a matrix.
Value: 3
TYPE_IDENTITY
static val TYPE_IDENTITY: Int
Indicates a transformation that has no effect (alpha = 1 and identity matrix.)
Value: 0
TYPE_MATRIX
static val TYPE_MATRIX: Int
Indicates a transformation that applies a matrix only (alpha = 1.)
Value: 2
Public constructors
Transformation
Transformation()
Creates a new transformation with alpha = 1 and the identity matrix.
Public methods
clear
open fun clear(): Unit
Reset the transformation to a state that leaves the object being animated in an unmodified state. The transformation type is TYPE_BOTH
by default.
compose
open fun compose(t: Transformation!): Unit
Apply this Transformation to an existing Transformation, e.g. apply a scale effect to something that has already been rotated.
Parameters | |
---|---|
t |
Transformation!: |
getMatrix
open fun getMatrix(): Matrix!
Return | |
---|---|
Matrix! |
The 3x3 Matrix representing the transformation to apply to the coordinates of the object being animated |
getTransformationType
open fun getTransformationType(): Int
Indicates the nature of this transformation.
Return | |
---|---|
Int |
TYPE_ALPHA , TYPE_MATRIX , TYPE_BOTH or TYPE_IDENTITY . |
set
open fun set(t: Transformation!): Unit
Clones the specified transformation.
Parameters | |
---|---|
t |
Transformation!: The transformation to clone. |
setAlpha
open fun setAlpha(alpha: Float): Unit
Sets the degree of transparency
Parameters | |
---|---|
alpha |
Float: 1.0 means fully opaque and 0.0 means fully transparent Value is between 0.0 and 1.0 inclusive |
setTransformationType
open fun setTransformationType(transformationType: Int): Unit
Sets the transformation type.
Parameters | |
---|---|
transformationType |
Int: One of TYPE_ALPHA , TYPE_MATRIX , TYPE_BOTH or TYPE_IDENTITY . |
toShortString
open fun toShortString(): String!
Return a string representation of the transformation in a compact form.
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |