MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / svgDataUrl

Function svgDataUrl

ui/src/lib/export-image.ts:27–29  ·  view source on GitHub ↗
(svg: string)

Source from the content-addressed store, hash-verified

25export const PNG_SCALE = 2;
26
27export 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. */
32export function svgPixelSize(svg: string): { width: number; height: number } {

Callers 1

svgToPngFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected