FileDocCategorySizeDatePackage
Matrix_DelegateTest.javaAPI DocAndroid 5.1 API1286Thu Mar 12 22:22:44 GMT 2015android.graphics

Matrix_DelegateTest

public class Matrix_DelegateTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestCopyConstructor()

        Matrix m1 = new Matrix();
        Matrix m2 = new Matrix(m1);

        float[] v1 = new float[9];
        float[] v2 = new float[9];
        m1.getValues(v1);
        m2.getValues(v2);

        for (int i = 0 ; i < 9; i++) {
            assertEquals(v1[i], v2[i]);
        }
    
public voidtestIdentity()

        Matrix m1 = new Matrix();

        assertTrue(m1.isIdentity());

        m1.setValues(new float[] { 1,0,0, 0,1,0, 0,0,1 });
        assertTrue(m1.isIdentity());