Package io.github.humbleui.skija.shaper
Class TextBlobBuilderRunHandler<T>
- java.lang.Object
-
- io.github.humbleui.skija.impl.Native
-
- io.github.humbleui.skija.impl.Managed
-
- io.github.humbleui.skija.shaper.TextBlobBuilderRunHandler<T>
-
- All Implemented Interfaces:
RunHandler,java.lang.AutoCloseable
public class TextBlobBuilderRunHandler<T> extends Managed implements RunHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextBlobBuilderRunHandler._FinalizerHolder-
Nested classes/interfaces inherited from class io.github.humbleui.skija.impl.Managed
Managed.CleanerThunk
-
-
Field Summary
Fields Modifier and Type Field Description ManagedString_text-
Fields inherited from class io.github.humbleui.skija.impl.Managed
_cleanable
-
-
Constructor Summary
Constructors Constructor Description TextBlobBuilderRunHandler(ManagedString text, boolean manageText, float offsetX, float offsetY)TextBlobBuilderRunHandler(java.lang.String text)TextBlobBuilderRunHandler(java.lang.String text, io.github.humbleui.types.Point offset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long_nGetFinalizer()static long_nMake(long textPtr, float offsetX, float offsetY)static long_nMakeBlob(long ptr)voidbeginLine()Called when beginning a line.voidclose()voidcommitLine()Called when ending a line.voidcommitRun(RunInfo info, short[] glyphs, io.github.humbleui.types.Point[] positions, int[] clusters)Called for each run in a line afterRunHandler.runOffset(io.github.humbleui.skija.shaper.RunInfo).voidcommitRunInfo()Called after allRunHandler.runInfo(io.github.humbleui.skija.shaper.RunInfo)calls for a line.@Nullable TextBlobmakeBlob()voidrunInfo(RunInfo info)Called once for each run in a line.io.github.humbleui.types.PointrunOffset(RunInfo info)Called for each run in a line afterRunHandler.commitRunInfo().-
Methods inherited from class io.github.humbleui.skija.impl.Managed
_nInvokeFinalizer, isClosed
-
-
-
-
Field Detail
-
_text
@Internal public final ManagedString _text
-
-
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()
-
beginLine
public void beginLine()
Description copied from interface:RunHandlerCalled when beginning a line.- Specified by:
beginLinein interfaceRunHandler
-
runInfo
public void runInfo(RunInfo info)
Description copied from interface:RunHandlerCalled once for each run in a line. Can compute baselines and offsets.- Specified by:
runInfoin interfaceRunHandler
-
commitRunInfo
public void commitRunInfo()
Description copied from interface:RunHandlerCalled after allRunHandler.runInfo(io.github.humbleui.skija.shaper.RunInfo)calls for a line.- Specified by:
commitRunInfoin interfaceRunHandler
-
runOffset
public io.github.humbleui.types.Point runOffset(RunInfo info)
Description copied from interface:RunHandlerCalled for each run in a line afterRunHandler.commitRunInfo().- Specified by:
runOffsetin interfaceRunHandler- Returns:
- an offset to add to every position
-
commitRun
public void commitRun(RunInfo info, short[] glyphs, io.github.humbleui.types.Point[] positions, int[] clusters)
Description copied from interface:RunHandlerCalled 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:
commitRunin interfaceRunHandlerpositions- 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:RunHandlerCalled when ending a line.- Specified by:
commitLinein interfaceRunHandler
-
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)
-
-