Class of android.graphics · Matrix.java · Android's reference
public class Matrix
A 3x3 matrix, row-major as Android's: MSCALE_X MSKEW_X MTRANS_X / MSKEW_Y MSCALE_Y MTRANS_Y / MPERSP_0 MPERSP_1 MPERSP_2. Pre operations apply before (on the right), post operations after (on the left).
Page 1 2
public static final int MSCALE_X = 0 sourcepublic static final int MSKEW_X = 1 sourcepublic static final int MTRANS_X = 2 sourcepublic static final int MSKEW_Y = 3 sourcepublic static final int MSCALE_Y = 4 sourcepublic static final int MTRANS_Y = 5 sourcepublic static final int MPERSP_0 = 6 sourcepublic static final int MPERSP_1 = 7 sourcepublic static final int MPERSP_2 = 8 sourcepublic static final Matrix IDENTITY_MATRIX sourcepublic Matrix() empty body sourcepublic Matrix(Matrix src) sourcepublic boolean isIdentity() sourcepublic boolean isAffine() sourcepublic boolean rectStaysRect() sourcepublic void set(Matrix src) sourcepublic void reset() sourcepublic void setTranslate(float dx, float dy) sourcepublic void setScale(float sx, float sy) sourcepublic void setScale(float sx, float sy, float px, float py) sourcepublic void setRotate(float degrees) sourcepublic void setRotate(float degrees, float px, float py) sourcepublic void setSinCos(float sin, float cos, float px, float py) sourcepublic void setSinCos(float sin, float cos) sourcepublic void setSkew(float kx, float ky, float px, float py) sourcepublic void setSkew(float kx, float ky) sourcepublic boolean setConcat(Matrix a, Matrix b) sourcepublic boolean preTranslate(float dx, float dy) sourcepublic boolean preScale(float sx, float sy, float px, float py) sourcepublic boolean preScale(float sx, float sy) sourcepublic boolean preRotate(float degrees, float px, float py) sourcepublic boolean preRotate(float degrees) sourcepublic boolean preSkew(float kx, float ky, float px, float py) sourcepublic boolean preSkew(float kx, float ky) sourcepublic boolean preConcat(Matrix other) sourcepublic boolean postTranslate(float dx, float dy) sourcepublic boolean postScale(float sx, float sy, float px, float py) sourcepublic boolean postScale(float sx, float sy) sourcepublic boolean postRotate(float degrees, float px, float py) sourcepublic boolean postRotate(float degrees) sourcepublic boolean postSkew(float kx, float ky, float px, float py) sourcepublic boolean postSkew(float kx, float ky) sourcepublic boolean postConcat(Matrix other) sourcepublic boolean setRectToRect(RectF src, RectF dst, ScaleToFit stf) sourcepublic boolean setPolyToPoly(float[] src, int srcIndex, float[] dst, int dstIndex, int pointCount) sourcepublic boolean invert(Matrix inverse) sourcePage 1 2
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.