appendLeadersToBuilder Function
Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.
This function processes an array of TextAnnotationLeader
objects, computes their attachment points
relative to a text frame (or a default rectangular frame if none is provided), and appends the leader
line and terminator geometry to the builder. It also applies color overrides if specified
in the leader's style overrides.
appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver): boolean
@returns true
if at least one leader with a terminator was successfully appended; otherwise, false
.
Parameter | Type | Description |
---|---|---|
builder | ElementGeometry.Builder | The geometry builder to which the leader geometries will be appended. |
leaders | TextAnnotationLeader[] | An array of leader properties. |
layout | TextBlockLayout | The layout information for the text block, including its range. |
transform | Transform | The transform to apply to the frame and leader geometry. |
params | GeometryParams | The geometry parameters, such as color, to use for the leader lines. |
textStyleResolver | TextStyleResolver |
Returns - boolean
true
if at least one leader with a terminator was successfully appended; otherwise, false
.
Defined in
Last Updated: 29 July, 2025