|
@@ -3,20 +3,23 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
- import {SCanvasView, SPath} from "@persagy-web/draw/lib";
|
|
|
|
|
|
+ import {SCanvasView, SPainter, SPath} from "@persagy-web/draw/lib";
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
|
|
|
class TestView222 extends SCanvasView {
|
|
class TestView222 extends SCanvasView {
|
|
|
|
+ path:SPath;
|
|
constructor() {
|
|
constructor() {
|
|
super('pathCanvas');
|
|
super('pathCanvas');
|
|
this.path = new SPath();
|
|
this.path = new SPath();
|
|
|
|
+ // @ts-ignore
|
|
this.path.polygon([{x:700,y:150},{x:0,y:150},{x:0,y:0}]);
|
|
this.path.polygon([{x:700,y:150},{x:0,y:150},{x:0,y:0}]);
|
|
|
|
+ // @ts-ignore
|
|
this.path.polygon([{x:100,y:100},{x:100,y:200},{x:200,y:200}]);
|
|
this.path.polygon([{x:100,y:100},{x:100,y:200},{x:200,y:200}]);
|
|
// this.path.polygon([{x:0,y:0},{x:0,y:150},{x:700,y:150}]);
|
|
// this.path.polygon([{x:0,y:0},{x:0,y:150},{x:700,y:150}]);
|
|
// this.path.polygon([{x:200,y:200},{x:100,y:200},{x:100,y:100}]);
|
|
// this.path.polygon([{x:200,y:200},{x:100,y:200},{x:100,y:100}]);
|
|
}
|
|
}
|
|
|
|
|
|
- onDraw(painter) {
|
|
|
|
|
|
+ onDraw(painter: SPainter) {
|
|
painter.drawPath(this.path)
|
|
painter.drawPath(this.path)
|
|
}
|
|
}
|
|
}
|
|
}
|