Optional
distance5
Optional
insideTell render2d I can sure this text is inside or not.
In case position is not using builtin inside
hints.
Optional
insideinsideFill
is a color string or left empty.
If a textContent
is "inside", its final fill
will be picked by this priority:
textContent.style.fill
> textConfig.insideFill
> "auto-calculated-fill"
In most cases, "auto-calculated-fill" is white.
Optional
insideinsideStroke
is a color string or left empty.
If a textContent
is "inside", its final stroke
will be picked by this priority:
textContent.style.stroke
> textConfig.insideStroke
> "auto-calculated-stroke"
The rule of getting "auto-calculated-stroke":
If (A) the fill
is specified in style (either in textContent.style
or textContent.style.rich
)
or (B) needed to draw text background (either defined in textContent.style
or textContent.style.rich
)
"auto-calculated-stroke" will be null.
Otherwise, "auto-calculated-stroke" will be the same as fill
of this element if possible, or null.
The reason of (A) is not decisive:
fill
in style and still use "auto-calculated-stroke", the effect
is not good and unexpected in some cases. It not easy and seams uncessary to auto calculate
a proper stroke
for the given fill
, since they can specify stroke
themselve.Optional
layoutRect that text will be positioned. Default to be the rect of element.
Optional
localIf use local user space. Which will apply host's transform
false
Optional
offsetOffset of the label. The difference of offset and position is that it will be applied in the rotation
Optional
originOrigin or rotation. Which is relative to the bounding box of the attached element. Can be percent value. Relative to the bounding box. If specified center. It will be center of the bounding box.
Only available when position and rotation are both set.
Optional
outsideoutsideFill
is a color string or left empty.
If a textContent
is "inside", its final fill
will be picked by this priority:
textContent.style.fill
> textConfig.outsideFill
> #000
Optional
outsideoutsideStroke
is a color string or left empth.
If a textContent
is not "inside", its final stroke
will be picked by this priority:
textContent.style.stroke
> textConfig.outsideStroke
> "auto-calculated-stroke"
The rule of getting "auto-calculated-stroke":
If (A) the fill
is specified in style (either in textContent.style
or textContent.style.rich
)
or (B) needed to draw text background (either defined in textContent.style
or textContent.style.rich
)
"auto-calculated-stroke" will be null.
Otherwise, "auto-calculated-stroke" will be a neer white color to distinguish "front end"
label with messy background (like other text label, line or other graphic).
Optional
positionPosition relative to the element bounding rect
'inside'
Optional
rotationRotation of the label.
Distance to the rect