package com.ys.bdtp.graph.utils

import android.graphics.Matrix
import android.graphics.PointF

object MatrixUtil {

    /**
     *
     */
    fun matrixTransform(mat: Matrix,x : Float, y : Float ) : PointF {
        val pointF = PointF()
        val src = kotlin.floatArrayOf(0f, 1f, 2f, 3f, 4f, 5f, 6f, 7f, 8f)
        mat.getValues(src)
        pointF.x = x * src[0] + y * src[1] + src[2];
        pointF.y = x * src[3] + y * src[4] + src[5];
        return pointF;
    }


}