Skip to content

buildLabelSvg

Builds the SVG for the caption band.

Import:

import { buildLabelSvg } from 'obsidian-integration-testing';

Signature:

function buildLabelSvg(text: string, geometry: LabelBandGeometry, imageWidthInPixels: number): string

Parameters:

Parameter Type Description
text string The caption.
geometry LabelBandGeometry The band geometry.
imageWidthInPixels number Width of the image, so the band spans it.

Returns: string — The SVG markup.