android.graphics
Class Matrix

java.lang.Object
  extended by android.graphics.Matrix

public class Matrix
extends Object


Nested Class Summary
static class Matrix.ScaleToFit
           
 
Field Summary
static int MPERSP_0
           
static int MPERSP_1
           
static int MPERSP_2
           
static int MSCALE_X
           
static int MSCALE_Y
           
static int MSKEW_X
           
static int MSKEW_Y
           
static int MTRANS_X
           
static int MTRANS_Y
           
 
Constructor Summary
Matrix()
           
Matrix(Matrix src)
           
 
Method Summary
 boolean equals(Object obj)
           
protected  void finalize()
           
 void getValues(float[] values)
           
 boolean invert(Matrix inverse)
           
 boolean isIdentity()
           
 void mapPoints(float[] pts)
           
 void mapPoints(float[] dst, float[] src)
           
 void mapPoints(float[] dst, int dstIndex, float[] src, int srcIndex, int pointCount)
           
 float mapRadius(float radius)
           
 boolean mapRect(RectF rect)
           
 boolean mapRect(RectF dst, RectF src)
           
 void mapVectors(float[] vecs)
           
 void mapVectors(float[] dst, float[] src)
           
 void mapVectors(float[] dst, int dstIndex, float[] src, int srcIndex, int vectorCount)
           
 boolean postConcat(Matrix other)
           
 boolean postRotate(float degrees)
           
 boolean postRotate(float degrees, float px, float py)
           
 boolean postScale(float sx, float sy)
           
 boolean postScale(float sx, float sy, float px, float py)
           
 boolean postSkew(float kx, float ky)
           
 boolean postSkew(float kx, float ky, float px, float py)
           
 boolean postTranslate(float dx, float dy)
           
 boolean preConcat(Matrix other)
           
 boolean preRotate(float degrees)
           
 boolean preRotate(float degrees, float px, float py)
           
 boolean preScale(float sx, float sy)
           
 boolean preScale(float sx, float sy, float px, float py)
           
 boolean preSkew(float kx, float ky)
           
 boolean preSkew(float kx, float ky, float px, float py)
           
 boolean preTranslate(float dx, float dy)
           
 boolean rectStaysRect()
           
 void reset()
           
 void set(Matrix src)
           
 boolean setConcat(Matrix a, Matrix b)
           
 boolean setPolyToPoly(float[] src, int srcIndex, float[] dst, int dstIndex, int pointCount)
           
 boolean setRectToRect(RectF src, RectF dst, Matrix.ScaleToFit stf)
           
 void setRotate(float degrees)
           
 void setRotate(float degrees, float px, float py)
           
 void setScale(float sx, float sy)
           
 void setScale(float sx, float sy, float px, float py)
           
 void setSinCos(float sinValue, float cosValue)
           
 void setSinCos(float sinValue, float cosValue, float px, float py)
           
 void setSkew(float kx, float ky)
           
 void setSkew(float kx, float ky, float px, float py)
           
 void setTranslate(float dx, float dy)
           
 void setValues(float[] values)
           
 String toShortString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSCALE_X

public static final int MSCALE_X
See Also:
Constant Field Values

MSKEW_X

public static final int MSKEW_X
See Also:
Constant Field Values

MTRANS_X

public static final int MTRANS_X
See Also:
Constant Field Values

MSKEW_Y

public static final int MSKEW_Y
See Also:
Constant Field Values

MSCALE_Y

public static final int MSCALE_Y
See Also:
Constant Field Values

MTRANS_Y

public static final int MTRANS_Y
See Also:
Constant Field Values

MPERSP_0

public static final int MPERSP_0
See Also:
Constant Field Values

MPERSP_1

public static final int MPERSP_1
See Also:
Constant Field Values

MPERSP_2

public static final int MPERSP_2
See Also:
Constant Field Values
Constructor Detail

Matrix

public Matrix()

Matrix

public Matrix(Matrix src)
Method Detail

isIdentity

public boolean isIdentity()

rectStaysRect

public boolean rectStaysRect()

set

public void set(Matrix src)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

reset

public void reset()

setTranslate

public void setTranslate(float dx,
                         float dy)

setScale

public void setScale(float sx,
                     float sy,
                     float px,
                     float py)

setScale

public void setScale(float sx,
                     float sy)

setRotate

public void setRotate(float degrees,
                      float px,
                      float py)

setRotate

public void setRotate(float degrees)

setSinCos

public void setSinCos(float sinValue,
                      float cosValue,
                      float px,
                      float py)

setSinCos

public void setSinCos(float sinValue,
                      float cosValue)

setSkew

public void setSkew(float kx,
                    float ky,
                    float px,
                    float py)

setSkew

public void setSkew(float kx,
                    float ky)

setConcat

public boolean setConcat(Matrix a,
                         Matrix b)

preTranslate

public boolean preTranslate(float dx,
                            float dy)

preScale

public boolean preScale(float sx,
                        float sy,
                        float px,
                        float py)

preScale

public boolean preScale(float sx,
                        float sy)

preRotate

public boolean preRotate(float degrees,
                         float px,
                         float py)

preRotate

public boolean preRotate(float degrees)

preSkew

public boolean preSkew(float kx,
                       float ky,
                       float px,
                       float py)

preSkew

public boolean preSkew(float kx,
                       float ky)

preConcat

public boolean preConcat(Matrix other)

postTranslate

public boolean postTranslate(float dx,
                             float dy)

postScale

public boolean postScale(float sx,
                         float sy,
                         float px,
                         float py)

postScale

public boolean postScale(float sx,
                         float sy)

postRotate

public boolean postRotate(float degrees,
                          float px,
                          float py)

postRotate

public boolean postRotate(float degrees)

postSkew

public boolean postSkew(float kx,
                        float ky,
                        float px,
                        float py)

postSkew

public boolean postSkew(float kx,
                        float ky)

postConcat

public boolean postConcat(Matrix other)

setRectToRect

public boolean setRectToRect(RectF src,
                             RectF dst,
                             Matrix.ScaleToFit stf)

setPolyToPoly

public boolean setPolyToPoly(float[] src,
                             int srcIndex,
                             float[] dst,
                             int dstIndex,
                             int pointCount)

invert

public boolean invert(Matrix inverse)

mapPoints

public void mapPoints(float[] dst,
                      int dstIndex,
                      float[] src,
                      int srcIndex,
                      int pointCount)

mapVectors

public void mapVectors(float[] dst,
                       int dstIndex,
                       float[] src,
                       int srcIndex,
                       int vectorCount)

mapPoints

public void mapPoints(float[] dst,
                      float[] src)

mapVectors

public void mapVectors(float[] dst,
                       float[] src)

mapPoints

public void mapPoints(float[] pts)

mapVectors

public void mapVectors(float[] vecs)

mapRect

public boolean mapRect(RectF dst,
                       RectF src)

mapRect

public boolean mapRect(RectF rect)

mapRadius

public float mapRadius(float radius)

getValues

public void getValues(float[] values)

setValues

public void setValues(float[] values)

toString

public String toString()
Overrides:
toString in class Object

toShortString

public String toShortString()

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2008-2012. All Rights Reserved.