Class TextNode

All Implemented Interfaces:
PointerInterface

public class TextNode extends RenderNode
A render node drawing a set of glyphs.

https://docs.gtk.org/gsk4/class.TextNode.html

  • Constructor Details

    • TextNode

      public TextNode(PointerContainer pointer)
    • TextNode

      public TextNode(@Nonnull Font font, @Nonnull GlyphString glyphs, @Nonnull RGBA color, @Nonnull Point offset)
      Creates a render node that renders the given glyphs.

      Note that @color may not be used if the font contains
      color glyphs.
      Parameters:
      font - the `PangoFont` containing the glyphs
      glyphs - the `PangoGlyphString` to render
      color - the foreground color to render with
      offset - offset of the baseline
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getColor

      public RGBA getColor()
      Retrieves the color used by the text @node.
      Returns:
      the text color
    • getFont

      public Font getFont()
      Returns the font used by the text @node.
      Returns:
      the font
    • getNumGlyphs

      public int getNumGlyphs()
      Retrieves the number of glyphs in the text node.
      Returns:
      the number of glyphs
    • getOffset

      public Point getOffset()
      Retrieves the offset applied to the text.
      Returns:
      a point with the horizontal and vertical offsets
    • hasColorGlyphs

      public boolean hasColorGlyphs()
      Checks whether the text @node has color glyphs.
      Returns:
      %TRUE if the text node has color glyphs
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()