get Matrix Scale - Android java.lang

Android examples for java.lang:Math Matrix

Description

get Matrix Scale

Demo Code


//package com.java2s;
import android.graphics.Matrix;

public class Main {
    public static float[] getScale(Matrix matrix) {
        float[] points = new float[9];
        matrix.getValues(points);//from w w  w  .  j a  v a 2  s . c  o m
        return new float[] { points[0], points[4] };
    }

    public static float[] getValues(Matrix m) {
        float[] values = new float[9];
        m.getValues(values);
        return values;
    }
}

Related Tutorials