12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <div>
- <canvas id="radialGradient5" width="740" height="400" tabindex="0"/>
- </div>
- </template>
- <script>
- import { SGraphScene, SGraphView } from "@persagy-web/graph/lib";
- import { SRadialGradient } from "@persagy-web/draw/lib";
- import {GradRect} from "./GradRect";
- export default {
- name: "radialGradient5",
- data(){
- return {
- view: ''
- }
- },
- mounted() {
- this.init();
- },
- methods:{
- init(){
- this.view = new SGraphView('radialGradient5');
- const scene = new SGraphScene();
-
- const grad1 = new SRadialGradient(
- 400,
- 400,
- 200,
- 600,
- 600,
- 200
- );
- const item = new GradRect(null, grad1);
- scene.addItem(item);
- this.view.scene = scene;
- this.view.fitSceneToView();
- this.view.scalable = false;
- }
- }
- }
- </script>
- <style scoped>
- </style>
|