(svg: string)
| 25 | export const PNG_SCALE = 2; |
| 26 | |
| 27 | export function svgDataUrl(svg: string): string { |
| 28 | return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`; |
| 29 | } |
| 30 | |
| 31 | /** The SVG's own root width/height, which the raster canvas has to match. */ |
| 32 | export function svgPixelSize(svg: string): { width: number; height: number } { |