Package io.github.humbleui.skija.shaper
Class TextLineRunHandler<T>
- java.lang.Object
-
- io.github.humbleui.skija.impl.Native
-
- io.github.humbleui.skija.impl.Managed
-
- io.github.humbleui.skija.shaper.TextLineRunHandler<T>
-
- All Implemented Interfaces:
RunHandler,java.lang.AutoCloseable
public class TextLineRunHandler<T> extends Managed implements RunHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextLineRunHandler._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 TextLineRunHandler(ManagedString text, boolean manageText)TextLineRunHandler(java.lang.String text)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long_nGetFinalizer()static long_nMake(long textPtr)static long_nMakeLine(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 TextLinemakeLine()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
-
TextLineRunHandler
@Internal public TextLineRunHandler(ManagedString text, boolean manageText)
-
TextLineRunHandler
public TextLineRunHandler(java.lang.String text)
-
-
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
-
makeLine
@Nullable public @Nullable TextLine makeLine()
-
_nGetFinalizer
@Internal public static long _nGetFinalizer()
-
_nMake
@Internal public static long _nMake(long textPtr)
-
_nMakeLine
@Internal public static long _nMakeLine(long ptr)
-
-