import Color from "parsegraph-color";
import { BasicWindow } from "parsegraph-window";
import Font, { GlyphData } from "./Font";
import { Matrix3x3 } from "parsegraph-matrix";
export default class GlyphPainter {
    _window: BasicWindow;
    _font: Font;
    _id: number;
    _maxSize: number;
    _textProgram: WebGLProgram;
    _numTextBuffers: number;
    _textBuffers: {
        [id: string]: GlyphPageRenderer;
    };
    _stride: number;
    _vertexBuffer: Float32Array;
    _color: Color;
    _backgroundColor: Color;
    _lines: any[];
    uWorld: WebGLUniformLocation;
    uScale: WebGLUniformLocation;
    uGlyphTexture: WebGLUniformLocation;
    aPosition: number;
    aColor: number;
    aBackgroundColor: number;
    aScale: number;
    aTexCoord: number;
    constructor(window: BasicWindow, font: Font);
    window(): BasicWindow;
    contextChanged(): void;
    color(): Color;
    setColor(r: Color | number, ...args: number[]): void;
    backgroundColor(): Color;
    setBackgroundColor(r: Color | number, ...args: number[]): void;
    fontSize(): number;
    font(): Font;
    drawLine(text: string, worldX: number, worldY: number, fontScale: number): void;
    drawGlyph(glyphData: GlyphData | string | number, x: number, y: number, fontScale: number): void;
    initBuffer(numGlyphs: any): void;
    clear(): void;
    render(world: Matrix3x3, scale: number): void;
}
export declare class GlyphPageRenderer {
    _painter: GlyphPainter;
    _glyphBufferVertexIndex: number;
    _dataBufferVertexIndex: number;
    _dataBufferNumVertices: number;
    _glyphBufferNumVertices: number;
    _textureIndex: number;
    _glyphBuffer: WebGLBuffer;
    _dataBuffer: Float32Array;
    constructor(painter: GlyphPainter, textureIndex: number);
    initBuffer(numGlyphs: number): void;
    clear(): void;
    flush(): void;
    writeVertex(): void;
    drawGlyph(glyphData: GlyphData, x: number, y: number, fontScale: number): void;
    render(): void;
}
//# sourceMappingURL=GlyphPainter.d.ts.map