Class GuiTextLayout

java.lang.Object
com.render.api.gui.GuiTextLayout

public final class GuiTextLayout extends Object
Immutable positioned-glyph layout with source-aware caret and selection geometry.
  • Method Details

    • sourceText

      public String sourceText()
    • metrics

      public GuiTextMetrics metrics()
    • resourceGeneration

      public long resourceGeneration()
    • nativeShaped

      public boolean nativeShaped()
    • renderable

      public boolean renderable()
      Whether the retained layout can be submitted, including per-cluster Minecraft fallback glyphs.
    • clipBounds

      public Optional<GuiRect> clipBounds()
      Optional authored clip rectangle; ink and effect metrics remain available outside this rectangle.
    • caretRect

      public GuiRect caretRect(int utf16Offset)
    • caretRect

      public GuiRect caretRect(int utf16Offset, GuiTextAffinity affinity)
      Returns the selected logical edge at a bidirectional boundary.
    • hitTest

      public GuiTextHit hitTest(float x, float y)
    • selectionRects

      public List<GuiRect> selectionRects(int startUtf16, int endUtf16)
    • moveVisual

      public int moveVisual(int utf16Offset, boolean right)
    • moveVisual

      public GuiTextHit moveVisual(int utf16Offset, GuiTextAffinity affinity, boolean right)
      Moves to the next distinct visual position while preserving the logical edge at bidi boundaries. Use the returned GuiTextHit.trailing() value as the next call's affinity.
    • moveVertical

      public int moveVertical(int utf16Offset, boolean down)