<template>
    <canvas id="drawPolyline1" width="800" height="100" />
</template>

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

    class TestView extends SCanvasView {
        arr:SPoint[]=[new SPoint(10,10),new SPoint(10,40),new SPoint(30,30)]
        constructor() {
            super("drawPolyline1")
        }

        onDraw(canvas: SPainter): void {
            canvas.drawPolyline(this.arr);
        }
    }

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