Code example for Surface

Methods: setAlpha, setMatrix, setPosition

0
        return delta;
    } 
 
    void setSnapshotTransform(Matrix matrix, float alpha) {
        matrix.getValues(mTmpFloats);
        mSurface.setPosition((int)mTmpFloats[Matrix.MTRANS_X],
                (int)mTmpFloats[Matrix.MTRANS_Y]);
        mSurface.setMatrix(
                mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
                mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
        mSurface.setAlpha(alpha);
        if (DEBUG) {
            float[] srcPnts = new float[] { 0, 0, mWidth, mHeight };
            float[] dstPnts = new float[4];
            matrix.mapPoints(dstPnts, srcPnts);
            Slog.i(TAG, "Original  : (" + srcPnts[0] + "," + srcPnts[1]
                    + ")-(" + srcPnts[2] + "," + srcPnts[3] + ")");
            Slog.i(TAG, "Transformed: (" + dstPnts[0] + "," + dstPnts[1]
                    + ")-(" + dstPnts[2] + "," + dstPnts[3] + ")");
        } 
Connect your IDE to all the code out there  Get Codota for Java