import type { Matrix2D } from './style.js'; export type CadLineWeightMode = 'adaptive' | 'physical' | 'hairline'; export interface CadLineStyleOptions { /** * adaptive: CAD-viewer style thin-line overview with physical line weights returning while zooming. * physical: preserve source line width exactly. * hairline: draw all strokes as one CSS-pixel hairlines. */ lineWeightMode?: CadLineWeightMode; /** Minimum visible stroke width, in CSS pixels. */ minStrokeCssPx?: number; /** Maximum stroke width used around fit-to-page / low zoom, in CSS pixels. */ maxOverviewStrokeCssPx?: number; /** Ignore text smaller than this CSS-pixel height to avoid black blobs in overview. */ minTextCssPx?: number; /** Ignore filled shapes below this CSS-pixel area in adaptive mode. */ minFilledAreaCssPx?: number; } export interface CadStrokeRuntime { dpr: number; zoom?: number; } export declare function estimateMatrixScale(m: Matrix2D): number; export declare function canvasDpr(canvas: HTMLCanvasElement): number; export declare function adaptiveStrokeUserWidth(sourceWidth: number, matrix: Matrix2D, opts: CadLineStyleOptions | undefined, runtime: CadStrokeRuntime): number; export declare function shouldDrawTextByPixelSize(fontSizeSourceUnits: number, matrix: Matrix2D, opts: CadLineStyleOptions | undefined, runtime: CadStrokeRuntime): boolean; export declare function shouldDrawFilledBounds(bounds: { minX: number; minY: number; maxX: number; maxY: number; } | undefined, matrix: Matrix2D, opts: CadLineStyleOptions | undefined, runtime: CadStrokeRuntime): boolean;