UNPKG

wesleytabaka-rpi-led-matrix

Version:

Fork of alexeden/rpi-led-matrix. Node.js/Typescript bindings for hzeller/rpi-rgb-led-matrix

27 lines (26 loc) 765 B
import { FontInstance } from './types'; export interface Glyph { h: number; w: number; char: string; } export interface MappedGlyph extends Glyph { x: number; y: number; } export declare type Word = Glyph[]; export declare type Line = Word[]; export declare enum HorizontalAlignment { Left = "left", Center = "center", Right = "right" } export declare enum VerticalAlignment { Bottom = "bottom", Middle = "middle", Top = "top" } export declare class LayoutUtils { static textToLines(font: FontInstance, maxW: number, text: string): Line[]; static linesToMappedGlyphs(lines: Line[], lineH: number, containerW: number, containerH: number, alignH?: HorizontalAlignment, alignV?: VerticalAlignment): MappedGlyph[]; }