UNPKG

typography-canvas-renderer

Version:

A lightweight npm package for rendering typographic content (text and images) on HTML5 Canvas with full CSS styling support including borders, border-radius, multiple border styles, inline text rendering, auto height calculation, and image support

18 lines 702 B
import type { Input, RenderElement } from './types.js'; /** * Processes and sorts elements by z-index for rendering */ export declare const processElements: (input: Input) => RenderElement[]; /** * Applies scaling factor to CSS properties if needed */ export declare const applyScaling: (css: Record<string, string>, scaleFactor: number) => Record<string, string>; /** * Determines if scaling should be applied based on canvas dimensions */ export declare const shouldApplyScaling: (width: number, height: number) => boolean; /** * Gets the appropriate scale factor for the canvas */ export declare const getScaleFactor: (input: Input) => number; //# sourceMappingURL=element-processor.d.ts.map