measureLabelCaption
Measures a caption against the frame it is destined for, without drawing anything.
This is what labelScreenshot rejects an overlong caption with, exposed so a caption can be chosen with the number in hand instead of by capturing a frame and looking at it.
Import:
import { measureLabelCaption } from 'obsidian-integration-testing';Signature:
function measureLabelCaption(params: MeasureLabelCaptionParams): Promise<LabelCaptionMeasurement>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | MeasureLabelCaptionParams | The caption and the dimensions of the image it is for. |
Returns: Promise<LabelCaptionMeasurement> — A Promise that resolves to the measurement.
Links to this page: