Class TextBlobBuilderRunHandler<T>

  • All Implemented Interfaces:
    RunHandler, java.lang.AutoCloseable

    public class TextBlobBuilderRunHandler<T>
    extends Managed
    implements RunHandler
    • Constructor Detail

      • TextBlobBuilderRunHandler

        @Internal
        public TextBlobBuilderRunHandler​(ManagedString text,
                                         boolean manageText,
                                         float offsetX,
                                         float offsetY)
      • TextBlobBuilderRunHandler

        public TextBlobBuilderRunHandler​(java.lang.String text)
      • TextBlobBuilderRunHandler

        public TextBlobBuilderRunHandler​(java.lang.String text,
                                         io.github.humbleui.types.Point offset)
    • Method Detail

      • close

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

        public void beginLine()
        Description copied from interface: RunHandler
        Called when beginning a line.
        Specified by:
        beginLine in interface RunHandler
      • runInfo

        public void runInfo​(RunInfo info)
        Description copied from interface: RunHandler
        Called once for each run in a line. Can compute baselines and offsets.
        Specified by:
        runInfo in interface RunHandler
      • commitRun

        public void commitRun​(RunInfo info,
                              short[] glyphs,
                              io.github.humbleui.types.Point[] positions,
                              int[] clusters)
        Description copied from interface: RunHandler

        Called for each run in a line after RunHandler.runOffset(io.github.humbleui.skija.shaper.RunInfo).

        WARN positions are reported from the start of the line, not run, only in Shaper.makeCoreText https://bugs.chromium.org/p/skia/issues/detail?id=10898

        Specified by:
        commitRun in interface RunHandler
        positions - put glyphs[i] at positions[i]
        clusters - clusters[i] is an utf-16 offset starting run which produced glyphs[i]
      • commitLine

        public void commitLine()
        Description copied from interface: RunHandler
        Called when ending a line.
        Specified by:
        commitLine in interface RunHandler
      • makeBlob

        @Nullable
        public @Nullable TextBlob makeBlob()
      • _nGetFinalizer

        @Internal
        public static long _nGetFinalizer()
      • _nMake

        @Internal
        public static long _nMake​(long textPtr,
                                  float offsetX,
                                  float offsetY)
      • _nMakeBlob

        @Internal
        public static long _nMakeBlob​(long ptr)