Class Text


  • public final class Text
    extends Primitive
    Drawable component for displaying text.
    • Field Detail

      • BASE_VIEWPORT_SIZE

        public static final float BASE_VIEWPORT_SIZE
        Viewport size (in pixels) on which the base font size is relative to
        See Also:
        Constant Field Values
    • Constructor Detail

      • Text

        public Text()
        The condition deciding if the drawable should be drawn.
      • Text

        public Text​(java.lang.Object position,
                    java.awt.Font baseFont,
                    java.awt.Color color,
                    java.lang.String text,
                    int halign,
                    int valign,
                    int absFlags,
                    IParsedExpression drawcondition)
    • Method Detail

      • getBaseFont

        public java.awt.Font getBaseFont()
      • getText

        public java.lang.String getText()
      • getTextHAlignment

        public double getTextHAlignment​(java.awt.font.TextLayout tl)
      • getBasicFontScale

        public static final float getBasicFontScale​(IVector2 canvasSize,
                                                    IVector2 areaSize,
                                                    IVector2 size)
      • getReplacedText

        public static final java.lang.String getReplacedText​(DrawableCombiner dc,
                                                             java.lang.Object obj,
                                                             java.lang.String text,
                                                             IViewport vp)