diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-15 16:30:22 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-16 00:19:32 +0100 |
| commit | 566eb2c9cce799ed8a3becc6d81560f1540eaacf (patch) | |
| tree | 4a711b16ff15c61842856a2bf2b830079f30bbcf /dist/smart-label-positioning.d.ts | |
Initial Release
Diffstat (limited to 'dist/smart-label-positioning.d.ts')
| -rw-r--r-- | dist/smart-label-positioning.d.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dist/smart-label-positioning.d.ts b/dist/smart-label-positioning.d.ts new file mode 100644 index 0000000..32ba4fd --- /dev/null +++ b/dist/smart-label-positioning.d.ts @@ -0,0 +1,33 @@ +/** + * Calculate optimal label position for a component + * @param {Object} component - Component object with label and coordinates + * @param {Object} mapData - Map data containing all components, edges, notes, etc. + * @param {Object} config - Configuration object + * @param {CanvasRenderingContext2D} ctx - Canvas context for text measurement + * @param {Array} allLines - Pre-collected lines from edges, evolutions, etc. + * @param {Array} noteRects - Pre-collected note rectangles + * @param {Array} inertiaRects - Pre-collected inertia rectangles + * @returns {Object} Position object with x, y coordinates in pixels + */ +export function calculateOptimalLabelPosition(component: any, mapData: any, config: any, ctx: CanvasRenderingContext2D, allLines: any[], noteRects: any[], inertiaRects: any[]): any; +/** + * Collect all lines from edges, evolutions, inertias, and axes + */ +export function collectAllLines(mapData: any, config: any, componentMap: any): { + start: { + x: number; + y: any; + }; + end: { + x: any; + y: any; + }; +}[]; +/** + * Collect all note rectangles + */ +export function collectNoteRects(mapData: any, config: any, ctx: any): any; +/** + * Collect all inertia rectangles + */ +export function collectInertiaRects(mapData: any, config: any, componentMap: any): any; |