@thi.ng/text-canvas
Version:
Text based canvas, drawing, plotting, tables with arbitrary formatting (incl. ANSI/HTML)
43 lines • 1.29 kB
TypeScript
import type { NumOrString } from "@thi.ng/api";
import type { Canvas } from "./canvas.js";
/**
* Clears/fills the canvas' current clip rect with given char (default:
* 0x20 / space). If `reset` is true, first resets all internal state
* (clipping, format, style), so that entire canvas will be cleared.
*
* @param canvas -
* @param reset -
* @param code -
*/
export declare const clear: (canvas: Canvas, reset?: boolean, code?: NumOrString) => void;
/**
* Clears or resets format of entire canvas.
*
* @param canvas -
* @param format -
*/
export declare const clearFormat: ({ data }: Canvas, format?: number) => void;
/**
* Fills given rect with char, taking currect clip rect and format into
* account.
*
* @param canvas -
* @param x -
* @param y -
* @param w -
* @param h -
* @param char -
*/
export declare const fillRect: (canvas: Canvas, x: number, y: number, w: number, h: number, char: NumOrString, format?: number) => void;
/**
* Draws an outline of given rect, taking the current clip rect, format
* and style into account.
*
* @param canvas -
* @param x -
* @param y -
* @param w -
* @param h -
*/
export declare const strokeRect: (canvas: Canvas, x: number, y: number, w: number, h: number, format?: number) => void;
//# sourceMappingURL=rect.d.ts.map