package com.ys.bdtp.cad.items

import android.graphics.*
import android.view.MotionEvent
import com.ys.bdtp.graph.SGraphyItem
import java.util.*


class GestureItem(parent: SGraphyItem? = null) : SGraphyItem(parent) {
    /** 画笔 */
    private val paint = Paint()
    private val path = Path()

    /**
     * 构造
     */
    init {

//        this.mContext = context;
        paint.setAntiAlias(true)
        paint.setStyle(Paint.Style.STROKE)
        paint.setStrokeWidth(5f)
        paint.setColor(Color.BLACK)
    } // Constructor

    override fun onActionMove(event: MotionEvent) {
        super.onActionMove(event)

    }

    override fun onActionUp() {
        super.onActionUp()
    }



    /**
     * Item绘制操作
     *
     * @param   canvas          画布
     * @param   rect            绘制区域
     */
    override fun onDraw(canvas: Canvas) {
        // 通过画布绘制多点形成的图形
        canvas.drawPath(path, paint)
        super.onDraw(canvas)
    } // Function onDraw()
} // Class DoorItem