Docsv2.12.12
Back to API Reference
Class

InlineMedia

abstract

Common entry-data base for inline-flowed media (InlineSprite, InlineObject). Carries the name and layout metrics that both shape (advance, bearingOffset) and rendering (size) need; the renderable payload is added by the concrete subclass.

Remarks

Pure shared data: one entry may be referenced by many components at once (e.g. through a shared UniTextSprites asset), so it holds no per-occurrence runtime state — the host InlineMediaModifier<TEntry, TWrapper> owns a wrapper pool per component. All metrics are in em units (relative to fontSize): size = (1,1) means the media is fontSize x fontSize pixels advance = 1 means the cursor moves by fontSize pixels after this media bearingOffset shifts the media relative to fontSize

Derived Types(2)

Types that inherit from InlineMedia.

public string name

Lookup name used in the tag parameter (e.g. jump in <sprite=jump>). Case-insensitive.

public Vector2 size

Size in em units (1 = fontSize on each axis).

public Vector2 bearingOffset

Offset from the layout position in em units.

public float advance

Advance width in em units (1 = fontSize).

public float lineHeight

Minimum height of lines containing this media, in em units (1 = fontSize). 0 = the media does not affect line height.