Class Paragraph

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Paragraph
    extends Managed
    • Constructor Detail

      • Paragraph

        @Internal
        public Paragraph​(long ptr,
                         ManagedString text)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class Managed
      • getMaxWidth

        public float getMaxWidth()
      • getHeight

        public float getHeight()
      • getMinIntrinsicWidth

        public float getMinIntrinsicWidth()
      • getMaxIntrinsicWidth

        public float getMaxIntrinsicWidth()
      • getAlphabeticBaseline

        public float getAlphabeticBaseline()
      • getIdeographicBaseline

        public float getIdeographicBaseline()
      • getLongestLine

        public float getLongestLine()
      • didExceedMaxLines

        public boolean didExceedMaxLines()
      • layout

        public Paragraph layout​(float width)
      • getRectsForRange

        public TextBox[] getRectsForRange​(int start,
                                          int end,
                                          RectHeightMode rectHeightMode,
                                          RectWidthMode rectWidthMode)
        Returns a vector of bounding boxes that enclose all text between start and end char indices, including start and excluding end.
      • getRectsForPlaceholders

        public TextBox[] getRectsForPlaceholders()
      • getGlyphPositionAtCoordinate

        public PositionWithAffinity getGlyphPositionAtCoordinate​(float dx,
                                                                 float dy)
      • getWordBoundary

        public io.github.humbleui.types.IRange getWordBoundary​(int offset)
      • getLineMetrics

        public LineMetrics[] getLineMetrics()
      • getLineNumber

        public long getLineNumber()
      • getUnresolvedGlyphsCount

        public int getUnresolvedGlyphsCount()
      • updateFontSize

        public Paragraph updateFontSize​(int from,
                                        int to,
                                        float size)
      • updateForegroundPaint

        public Paragraph updateForegroundPaint​(int from,
                                               int to,
                                               Paint paint)
      • updateBackgroundPaint

        public Paragraph updateBackgroundPaint​(int from,
                                               int to,
                                               Paint paint)
      • _nGetFinalizer

        public static long _nGetFinalizer()
      • _nGetMaxWidth

        public static float _nGetMaxWidth​(long ptr)
      • _nGetHeight

        public static float _nGetHeight​(long ptr)
      • _nGetMinIntrinsicWidth

        public static float _nGetMinIntrinsicWidth​(long ptr)
      • _nGetMaxIntrinsicWidth

        public static float _nGetMaxIntrinsicWidth​(long ptr)
      • _nGetAlphabeticBaseline

        public static float _nGetAlphabeticBaseline​(long ptr)
      • _nGetIdeographicBaseline

        public static float _nGetIdeographicBaseline​(long ptr)
      • _nGetLongestLine

        public static float _nGetLongestLine​(long ptr)
      • _nDidExceedMaxLines

        public static boolean _nDidExceedMaxLines​(long ptr)
      • _nLayout

        public static void _nLayout​(long ptr,
                                    float width)
      • _nPaint

        public static long _nPaint​(long ptr,
                                   long canvasPtr,
                                   float x,
                                   float y)
      • _nGetRectsForRange

        public static TextBox[] _nGetRectsForRange​(long ptr,
                                                   int start,
                                                   int end,
                                                   int rectHeightMode,
                                                   int rectWidthMode)
      • _nGetRectsForPlaceholders

        public static TextBox[] _nGetRectsForPlaceholders​(long ptr)
      • _nGetGlyphPositionAtCoordinate

        public static int _nGetGlyphPositionAtCoordinate​(long ptr,
                                                         float dx,
                                                         float dy)
      • _nGetWordBoundary

        public static long _nGetWordBoundary​(long ptr,
                                             int offset)
      • _nGetLineMetrics

        public static LineMetrics[] _nGetLineMetrics​(long ptr,
                                                     long textPtr)
      • _nGetLineNumber

        public static long _nGetLineNumber​(long ptr)
      • _nMarkDirty

        public static void _nMarkDirty​(long ptr)
      • _nGetUnresolvedGlyphsCount

        public static int _nGetUnresolvedGlyphsCount​(long ptr)
      • _nUpdateAlignment

        public static void _nUpdateAlignment​(long ptr,
                                             int Align)
      • _nUpdateFontSize

        public static void _nUpdateFontSize​(long ptr,
                                            int from,
                                            int to,
                                            float size,
                                            long textPtr)
      • _nUpdateForegroundPaint

        public static void _nUpdateForegroundPaint​(long ptr,
                                                   int from,
                                                   int to,
                                                   long paintPtr,
                                                   long textPtr)
      • _nUpdateBackgroundPaint

        public static void _nUpdateBackgroundPaint​(long ptr,
                                                   int from,
                                                   int to,
                                                   long paintPtr,
                                                   long textPtr)