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
30 lines • 852 B
TypeScript
import type { LoadedImage } from './types.js';
/**
* Loads an image from URL or base64 string
*/
export declare const loadImage: (src: string) => Promise<LoadedImage>;
/**
* Loads multiple images concurrently
*/
export declare const loadImages: (srcs: string[]) => Promise<LoadedImage[]>;
/**
* Clears the image cache
*/
export declare const clearImageCache: () => void;
/**
* Gets the current cache size
*/
export declare const getCacheSize: () => number;
/**
* Validates if a string is a valid base64 image
*/
export declare const isValidBase64Image: (src: string) => boolean;
/**
* Validates if a string is a valid image URL
*/
export declare const isValidImageUrl: (src: string) => boolean;
/**
* Validates image source format
*/
export declare const validateImageSrc: (src: string) => void;
//# sourceMappingURL=image-loader.d.ts.map