@stringsync/vexml
Version:
MusicXML to Vexflow
26 lines (25 loc) • 881 B
TypeScript
import * as vexflow from 'vexflow';
import { Config } from '../config';
import { Logger } from '../debug';
import { Point, Rect } from '../spatial';
import { Drawable, Padding } from './types';
export type LabelFont = {
color?: string;
family?: string;
size?: string;
lineHeight?: number;
};
export declare class Label implements Drawable {
private config;
private log;
private lines;
private font;
readonly rect: Rect;
private ctx;
private constructor();
static singleLine(config: Config, log: Logger, textContent: string, position: Point, padding: Padding, font: LabelFont): Label;
static centerAligned(config: Config, log: Logger, maxWidth: number, textContent: string, position: Point, padding: Padding, font: LabelFont): Label;
private static split;
setContext(ctx: vexflow.RenderContext): this;
draw(): this;
}