Matrix
public
class
Matrix
extends Object
| java.lang.Object | |
| ↳ | android.graphics.Matrix |
The Matrix class holds a 3x3 matrix for transforming coordinates.
Summary
Constants | |
|---|---|
int |
MPERSP_0
|
int |
MPERSP_1
|
int |
MPERSP_2
|
int |
MSCALE_X
|
int |
MSCALE_Y
|
int |
MSKEW_X
|
int |
MSKEW_Y
|
int |
MTRANS_X
|
int |
MTRANS_Y
|
Fields | |
|---|---|
public
static
final
Matrix |
IDENTITY_MATRIX
The identity matrix. |
Public constructors | |
|---|---|
Matrix()
Create an identity matrix |
|
Matrix(Matrix src)
Create a matrix that is a (deep) copy of src |
|
Public methods | |
|---|---|
final
void
|
dump(PrintWriter pw)
Dumps a human-readable shortened string of the matrix into the given stream |
boolean
|
equals(Object obj)
Returns true iff obj is a Matrix and its values equal our values. |
void
|
getValues(float[] values)
Copy 9 values from the matrix into the array. |
int
|
hashCode()
Returns a hash code value for the object. |
boolean
|
invert(Matrix inverse)
If this matrix can be inverted, return true and if inverse is not null, set inverse to be the inverse of this matrix. |
boolean
|
isAffine()
Gets whether this matrix is affine. |
boolean
|
isIdentity()
Returns true if the matrix is identity. |
void
|
mapPoints(float[] dst, int dstIndex, float[] src, int srcIndex, int pointCount)
Apply this matrix to the array of 2D points specified by src, and write the transformed points into the array of points specified by dst. |
void
|
mapPoints(float[] dst, float[] src)
Apply this matrix to the array of 2D points specified by src, and write the transformed points into the array of points specified by dst. |
void
|
mapPoints(float[] pts)
|