Browse Source

补充提交

develop
徐振升 4 years ago
parent
commit
6277ce16f5
  1. 11
      src/app/working-area/model/axImageShapeTest.ts
  2. 40
      src/app/working-area/model/axRectangleShape.ts

11
src/app/working-area/model/axImageShapeTest.ts

@ -0,0 +1,11 @@
import { AxRectangleShape } from "./axRectangleShape";
export class AxImageShapeTest extends AxRectangleShape{
/**
*
*/
constructor(x:number,y:number,width:number,height:number) {
super(x,y,width,height);
}
}

40
src/app/working-area/model/axRectangleShape.ts

@ -0,0 +1,40 @@
/**
* Copyright (c) 2006-2015, JGraph Ltd
* Copyright (c) 2006-2015, Gaudenz Alder
*/
import { Graphics } from "pixi.js";
/**
* Class: mxRectangleShape
*
* Extends <mxShape> to implement a rectangle shape.
* This shape is registered under <mxConstants.SHAPE_RECTANGLE>
* in <mxCellRenderer>.
*
* Constructor: mxRectangleShape
*
* Constructs a new rectangle shape.
*
* Parameters:
*
* bounds - <mxRectangle> that defines the bounds. This is stored in
* <mxShape.bounds>.
* fill - String that defines the fill color. This is stored in <fill>.
* stroke - String that defines the stroke color. This is stored in <stroke>.
* strokewidth - Optional integer that defines the stroke width. Default is
* 1. This is stored in <strokewidth>.
*/
export class AxRectangleShape extends Graphics{
/**
*
*/
constructor(x:number,y:number,width:number,height:number) {
super();
this.beginFill(0x0000ff,0);
this.lineStyle(1, 0xff0000,0);
this.drawRect(x, y, width, height);
this.endFill();
console.log(this.getLocalBounds());
}
}
Loading…
Cancel
Save