wave-roll
Version:
JavaScript Library for Comparative MIDI Piano-Roll Visualization
63 lines • 2.15 kB
TypeScript
/**
* Drawing primitive utilities for consistent rendering
*/
import * as PIXI from 'pixi.js';
export interface LineStyle {
width: number;
color: number;
alpha?: number;
cap?: PIXI.LineCap;
join?: PIXI.LineJoin;
}
export interface FillStyle {
color: number;
alpha?: number;
}
export interface Rectangle {
x: number;
y: number;
width: number;
height: number;
}
/**
* Drawing primitives helper class
*/
export declare class DrawingPrimitives {
/**
* Draw a vertical line
*/
static drawVerticalLine(graphics: PIXI.Graphics, x: number, height: number, style: LineStyle, yOffset?: number): void;
/**
* Draw a horizontal line
*/
static drawHorizontalLine(graphics: PIXI.Graphics, y: number, width: number, style: LineStyle, xOffset?: number): void;
/**
* Draw a rectangle with fill
*/
static drawRectangle(graphics: PIXI.Graphics, bounds: Rectangle, fillStyle?: FillStyle, strokeStyle?: LineStyle): void;
/**
* Draw a rounded rectangle
*/
static drawRoundedRectangle(graphics: PIXI.Graphics, bounds: Rectangle, radius: number, fillStyle?: FillStyle, strokeStyle?: LineStyle): void;
/**
* Draw a circle
*/
static drawCircle(graphics: PIXI.Graphics, x: number, y: number, radius: number, fillStyle?: FillStyle, strokeStyle?: LineStyle): void;
/**
* Draw a dashed line (vertical)
*/
static drawDashedVerticalLine(graphics: PIXI.Graphics, x: number, height: number, dashLength: number, gapLength: number, style: LineStyle, yOffset?: number): void;
/**
* Draw a dashed line (horizontal)
*/
static drawDashedHorizontalLine(graphics: PIXI.Graphics, y: number, width: number, dashLength: number, gapLength: number, style: LineStyle, xOffset?: number): void;
/**
* Clear and reset graphics object
*/
static clearGraphics(graphics: PIXI.Graphics): void;
/**
* Draw grid lines
*/
static drawGrid(graphics: PIXI.Graphics, bounds: Rectangle, cellWidth: number, cellHeight: number, style: LineStyle): void;
}
//# sourceMappingURL=drawing-primitives.d.ts.map