diginext-pixi
Version:
README.md
40 lines (39 loc) • 1.39 kB
TypeScript
import * as PIXI from 'pixi.js';
export type Dashes = number[];
export interface DashLineOptions {
dash?: Dashes;
width?: number;
color?: number;
alpha?: number;
scale?: number;
useTexture?: boolean;
useDots?: boolean;
cap?: PIXI.LINE_CAP;
join?: PIXI.LINE_JOIN;
alignment?: number;
}
export default class DashLine {
graphics: PIXI.Graphics;
lineLength: number | undefined;
cursor: PIXI.Point;
scale: number;
private activeTexture;
private start;
private dashSize;
private dash;
private useTexture;
private options;
static dashTextureCache: Record<string, PIXI.Texture>;
constructor(graphics: PIXI.Graphics, options?: DashLineOptions);
setLineStyle(): void;
private static distance;
moveTo(x: number, y: number): this;
lineTo(x: number, y: number, closePath?: boolean): this;
closePath(): void;
drawCircle(x: number, y: number, radius: number, points?: number, matrix?: PIXI.Matrix): this;
drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points?: number, matrix?: PIXI.Matrix): this;
drawPolygon(points: PIXI.Point[] | number[], matrix?: PIXI.Matrix): this;
drawRect(x: number, y: number, width: number, height: number, matrix?: PIXI.Matrix): this;
private adjustLineStyle;
private static getTexture;
}