UNPKG

@pilotlab/lux-tools

Version:

A luxurious user experience framework, developed by your friends at Pilot.

16 lines (15 loc) 718 B
import Result from '@pilotlab/result'; import { Size } from '@pilotlab/attributes'; export declare class WebTools { static loadJavascript(url: string): Result<boolean>; static calculateContentSize(node: any): { width: number; height: number; }; static calculateHeight(strHtml: string, width?: number): number; static calculateHtmlSize(strHtml: string, width?: number): Size; static autoEllipseText(text: string, width: number, height: number, className: string): string; static imageToCanvas(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): HTMLCanvasElement; static canvasToImage(canvas: HTMLCanvasElement): HTMLImageElement; } export default WebTools;