<template>
    <canvas id="DrawLine1" width="800" height="200" />
</template>

<script lang="ts">
    import { SCanvasView, SPainter } from "@saga-web/draw/lib";

    class TestView extends SCanvasView {

        constructor() {
            super("DrawLine1")
        }

        onDraw(canvas: SPainter): void {
            // 在此编写绘制操作相关命令
            canvas.drawLine(0,0, 200, 200);
        }
    }

    export default {
        mounted() {
            new TestView();
        }
    }
</script>
