interface RVG · Visuals
RvgAnchoredText
interface RvgAnchoredText extends RvgVisual, Pin, StringValue
A text at a pin: its position and direction place the text, its value is the text.
Properties
extentreadonly
extent: BoxThe axis-aligned box around the text as it is drawn, in the coordinates of its anchor. Reactive: it changes with the text, the anchor and the loaded fonts.
The height is the font box (ascent to descent of the font), the same for every text in the
same style, so that labels line up; the width is the advance width of the text. Rotation,
oriented, flip and the offset are taken into account, the text-anchor of the options or
else of the style, and the dominant baseline of the style. A CSS transform on the text
element itself is not. In the browser it matches the element's bounding box within about a
pixel; italic glyphs can reach a little past the advance width.
Like every value that depends on others, the extent is updated after the reaction that
changed the text or the anchor: inside a Reactive.do that sets value, extent still
holds the box from before the reaction. Read it outside that reaction, or in a reaction that
depends on extent itself. To try texts before a label shows one, use text.measure of the
group.
Inherited
From RvgVisual applyStyleDirective, fromGraphic, getVisualBoundingBox, mounted, toGraphic, visible, zIndex
From StringValue value
