(svg: string)
| 188 | } |
| 189 | |
| 190 | function rootSize(svg: string): { width: number; height: number } { |
| 191 | const w = /<svg[^>]*\bwidth="(\d+)"/.exec(svg); |
| 192 | const h = /<svg[^>]*\bheight="(\d+)"/.exec(svg); |
| 193 | return { width: Number(w![1]), height: Number(h![1]) }; |
| 194 | } |
| 195 | |
| 196 | /** Every x/y coordinate that appears on a drawn element, for a bounds check. */ |
| 197 | function coords(svg: string): Array<{ x: number; y: number }> { |
no test coverage detected