123456789101112131415161718192021222324252627 |
- <template>
- <canvas id="CExampleWebGraphDrawLine" width="800" height="200" />
- </template>
- <script lang="ts">
- import {SCanvasView, SPainter} from "@saga-web/draw/lib";
- class TestView extends SCanvasView {
- constructor() {
- super("CExampleWebGraphDrawLine")
- }
- protected onDraw(canvas: SPainter): void {
- // 在此编写绘制操作相关命令
- canvas.drawLine(0,0, 200, 200);
- }
- }
- export default {
- name: "DrawLine",
- mounted() {
- console.log(this);
- var view = new TestView();
- }
- }
- </script>
|