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:

ParameterTypeDescription
textstringThe caption.
geometryLabelBandGeometryThe band geometry.
imageWidthInPixelsnumberWidth of the image, so the band spans it.

Returns: string — The SVG markup.