Java Code Examples for android.graphics.Matrix.MSKEW_Y

The following are Jave code examples for showing how to use MSKEW_Y of the android.graphics.Matrix class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: PlusGram   File: GLMatrix.java   Source Code and License Vote up 5 votes
public static float[] LoadGraphicsMatrix(Matrix matrix) {
    float m[] = new float[16];
    float v[] = new float[9];
    matrix.getValues(v);

    m[0] = v[Matrix.MSCALE_X]; //m.a;
    m[1] = v[Matrix.MSKEW_X]; //m.b;
    m[2] = 0.0f;
    m[3] = 0.0f;

    m[4] = v[Matrix.MSKEW_Y]; //m.c;
    m[5] = v[Matrix.MSCALE_Y]; //m.d;
    m[6] = 0.0f;
    m[7] = 0.0f;

    m[8] = 0.0f;
    m[9] = 0.0f;
    m[10] = 1.0f;
    m[11] = 0.0f;

    m[12] = v[Matrix.MTRANS_X]; //m.tx;
    m[13] = v[Matrix.MTRANS_Y]; //m.ty;
    m[14] = 0.0f;
    m[15] = 1.0f;

    return m;
}