package com.sybotan.android.graphy


import android.graphics.Matrix
import android.view.MotionEvent


class SMotionEvent() {

    /** x 坐标 */
    var y: Double = 0.0
    /** y 坐标 */
    var x: Double = 0.0
    /** 事件类型 */
    var type: String? = null
    /** 图坐标 X */
    var viewX: Double? = 0.0
    /** 图坐标 Y */
    var viewY: Double? = 0.0
    /** 矩阵 */
    var matrix = Matrix()


    constructor(e: MotionEvent){
        this.viewX = e.x.toDouble()
        this.viewY = e.y.toDouble()
    }

    constructor(e: SMotionEvent){
        this.x = e.x
        this.y = e.y
        this.viewX = e.viewX
        this.viewY = e.viewY
        matrix.set(e.matrix)

    }
}