1234567891011121314151617181920212223242526 |
- <template>
- <canvas id="drawPolyline1" width="800" height="100" />
- </template>
- <script lang="ts">
- import {SCanvasView, SColor, SPainter, SPoint} from "@persagy-web/draw/lib";
- import { Component, Prop, Vue } from "vue-property-decorator";
- 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);
- }
- }
- @Component
- export default class DrawPolyline1 extends Vue {
- mounted(): void {
- new TestView();
- }
- }
- </script>
|