Matrix

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).

Nested types

Page 1 2

Fields

public static final int MSCALE_X = 0 source
public static final int MSKEW_X = 1 source
public static final int MTRANS_X = 2 source
public static final int MSKEW_Y = 3 source
public static final int MSCALE_Y = 4 source
public static final int MTRANS_Y = 5 source
public static final int MPERSP_0 = 6 source
public static final int MPERSP_1 = 7 source
public static final int MPERSP_2 = 8 source
public static final Matrix IDENTITY_MATRIX source

Constructors

public Matrix() empty body source
public Matrix(Matrix src) source

Methods

public boolean isIdentity() source
public boolean isAffine() source
public boolean rectStaysRect() source
public void set(Matrix src) source
public void reset() source
public void setTranslate(float dx, float dy) source
public void setScale(float sx, float sy) source
public void setScale(float sx, float sy, float px, float py) source
public void setRotate(float degrees) source
public void setRotate(float degrees, float px, float py) source
public void setSinCos(float sin, float cos, float px, float py) source
public void setSinCos(float sin, float cos) source
public void setSkew(float kx, float ky, float px, float py) source
public void setSkew(float kx, float ky) source
public boolean setConcat(Matrix a, Matrix b) source
public boolean preTranslate(float dx, float dy) source
public boolean preScale(float sx, float sy, float px, float py) source
public boolean preScale(float sx, float sy) source
public boolean preRotate(float degrees, float px, float py) source
public boolean preRotate(float degrees) source
public boolean preSkew(float kx, float ky, float px, float py) source
public boolean preSkew(float kx, float ky) source
public boolean preConcat(Matrix other) source
public boolean postTranslate(float dx, float dy) source
public boolean postScale(float sx, float sy, float px, float py) source
public boolean postScale(float sx, float sy) source
public boolean postRotate(float degrees, float px, float py) source
public boolean postRotate(float degrees) source
public boolean postSkew(float kx, float ky, float px, float py) source
public boolean postSkew(float kx, float ky) source
public boolean postConcat(Matrix other) source
public boolean setRectToRect(RectF src, RectF dst, ScaleToFit stf) source
public boolean setPolyToPoly(float[] src, int srcIndex, float[] dst, int dstIndex, int pointCount) source
public boolean invert(Matrix inverse) source

Page 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.