考核考试系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
1.7 KiB

import * as PIXI from 'pixi.js';
// import { Point, Rectangle, Graphics } from 'pixi.js';
/**
* 安信形状
*/
export class AxShape extends PIXI.Container {
points: Array<PIXI.Point> = [];
title: string;
titleVisible: boolean;
g: PIXI.Graphics = new PIXI.Graphics();
constructor() {
super();
this.addChild(this.g);
// this.drawDashedLine(this.g, new Point(0, 0), new Point(0, 200), 0xff0000);
}
// /**
// * 绘制虚线
// * @param g
// * @param p0
// * @param pe
// * @param color
// * @param width
// * @param dashLen
// */
// drawDashedLine(g: Graphics, p0: Point, pe: Point, color: number, width: number = 1, dashLen: number = 5) {
// g.lineStyle(width, color);
// const len = Math.sqrt(Math.pow(pe.x - p0.x, 2) + Math.pow(pe.y - p0.y, 2));
// // tslint:disable-next-line: no-bitwise
// const num = ~~(len / dashLen);
// for (let i = 0; i < num; i++) {
// const x = p0.x + (pe.x - p0.x) / num * i;
// const y = p0.y + (pe.y - p0.y) / num * i;
// // tslint:disable-next-line: no-bitwise
// i & 1 ? g.lineTo(x, y) : g.moveTo(x, y);
// }
// }
paintVertexShape(rect: PIXI.Rectangle) {
// this.paintBackground(c, x, y, w, h);
// if (!this.outline || this.style == null || mxUtils.getValue(
// this.style, mxConstants.STYLE_BACKGROUND_OUTLINE, 0) == 0)
// {
// c.setShadow(false);
// this.paintForeground(c, x, y, w, h);
// }
}
paintBackground(rect: PIXI.Rectangle) { }
paintForeground(rect: PIXI.Rectangle) { }
paintEdgeShape(pts: Array<PIXI.Point>) { }
}