Class TextBlobBuilder
- java.lang.Object
-
- io.github.humbleui.skija.impl.Native
-
- io.github.humbleui.skija.impl.Managed
-
- io.github.humbleui.skija.TextBlobBuilder
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class TextBlobBuilder extends Managed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextBlobBuilder._FinalizerHolder-
Nested classes/interfaces inherited from class io.github.humbleui.skija.impl.Managed
Managed.CleanerThunk
-
-
Field Summary
-
Fields inherited from class io.github.humbleui.skija.impl.Managed
_cleanable
-
-
Constructor Summary
Constructors Constructor Description TextBlobBuilder()Constructs empty TextBlobBuilder.TextBlobBuilder(long ptr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void_nAppendRun(long ptr, long fontPtr, short[] glyphs, float x, float y, io.github.humbleui.types.Rect bounds)static void_nAppendRunPos(long ptr, long fontPtr, short[] glyphs, float[] pos, io.github.humbleui.types.Rect bounds)static void_nAppendRunPosH(long ptr, long fontPtr, short[] glyphs, float[] xs, float y, io.github.humbleui.types.Rect bounds)static void_nAppendRunRSXform(long ptr, long fontPtr, short[] glyphs, float[] xform)static long_nBuild(long ptr)static long_nGetFinalizer()static long_nMake()TextBlobBuilderappendRun(Font font, short[] glyphs, float x, float y, @Nullable io.github.humbleui.types.Rect bounds)Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.TextBlobBuilderappendRun(Font font, java.lang.String text, float x, float y)Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.TextBlobBuilderappendRun(Font font, java.lang.String text, float x, float y, @Nullable io.github.humbleui.types.Rect bounds)Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.TextBlobBuilderappendRunPos(Font font, short[] glyphs, io.github.humbleui.types.Point[] pos)Glyphs are positioned at positions from pos.TextBlobBuilderappendRunPos(Font font, short[] glyphs, io.github.humbleui.types.Point[] pos, @Nullable io.github.humbleui.types.Rect bounds)Glyphs are positioned at positions from pos.TextBlobBuilderappendRunPosH(Font font, short[] glyphs, float[] xs, float y)Glyphs are positioned on a baseline at y, using x-axis positions from xs.TextBlobBuilderappendRunPosH(Font font, short[] glyphs, float[] xs, float y, @Nullable io.github.humbleui.types.Rect bounds)Glyphs are positioned on a baseline at y, using x-axis positions from xs.TextBlobBuilderappendRunRSXform(Font font, short[] glyphs, RSXform[] xform)@Nullable TextBlobbuild()Returns TextBlob built from runs of glyphs added by builder.-
Methods inherited from class io.github.humbleui.skija.impl.Managed
_nInvokeFinalizer, close, isClosed
-
-
-
-
Method Detail
-
build
@Nullable public @Nullable TextBlob build()
Returns TextBlob built from runs of glyphs added by builder. Returned TextBlob is immutable; it may be copied, but its contents may not be altered. Returns null if no runs of glyphs were added by builder.
Resets TextBlobBuilder to its initial empty state, allowing it to be reused to build a new set of runs.
- Returns:
- SkTextBlob or null
- See Also:
- https://fiddle.skia.org/c/@TextBlobBuilder_make
-
appendRun
public TextBlobBuilder appendRun(Font font, java.lang.String text, float x, float y)
Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.- Parameters:
font- Font used for this runtext- Text to append in this runx- horizontal offset within the bloby- vertical offset within the blob- Returns:
- this
-
appendRun
public TextBlobBuilder appendRun(Font font, java.lang.String text, float x, float y, @Nullable @Nullable io.github.humbleui.types.Rect bounds)
Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.
bounds defines an optional bounding box, used to suppress drawing when TextBlob bounds does not intersect Surface bounds. If bounds is null, TextBlob bounds is computed from (x, y) and glyphs metrics.
- Parameters:
font- Font used for this runtext- Text to append in this runx- horizontal offset within the bloby- vertical offset within the blobbounds- optional run bounding box- Returns:
- this
-
appendRun
public TextBlobBuilder appendRun(Font font, short[] glyphs, float x, float y, @Nullable @Nullable io.github.humbleui.types.Rect bounds)
Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.
bounds defines an optional bounding box, used to suppress drawing when TextBlob bounds does not intersect Surface bounds. If bounds is null, TextBlob bounds is computed from (x, y) and glyphs metrics.
- Parameters:
font- Font used for this runglyphs- glyphs in this runx- horizontal offset within the bloby- vertical offset within the blobbounds- optional run bounding box- Returns:
- this
-
appendRunPosH
public TextBlobBuilder appendRunPosH(Font font, short[] glyphs, float[] xs, float y)
Glyphs are positioned on a baseline at y, using x-axis positions from xs.
- Parameters:
font- Font used for this runglyphs- glyphs in this runxs- horizontal positions on glyphs within the bloby- vertical offset within the blob- Returns:
- this
-
appendRunPosH
public TextBlobBuilder appendRunPosH(Font font, short[] glyphs, float[] xs, float y, @Nullable @Nullable io.github.humbleui.types.Rect bounds)
Glyphs are positioned on a baseline at y, using x-axis positions from xs.
bounds defines an optional bounding box, used to suppress drawing when TextBlob bounds does not intersect Surface bounds. If bounds is null, TextBlob bounds is computed from (x, y) and glyphs metrics.
- Parameters:
font- Font used for this runglyphs- glyphs in this runxs- horizontal positions of glyphs within the bloby- vertical offset within the blobbounds- optional run bounding box- Returns:
- this
-
appendRunPos
public TextBlobBuilder appendRunPos(Font font, short[] glyphs, io.github.humbleui.types.Point[] pos)
Glyphs are positioned at positions from pos.
- Parameters:
font- Font used for this runglyphs- glyphs in this runpos- positions of glyphs within the blob- Returns:
- this
-
appendRunPos
public TextBlobBuilder appendRunPos(Font font, short[] glyphs, io.github.humbleui.types.Point[] pos, @Nullable @Nullable io.github.humbleui.types.Rect bounds)
Glyphs are positioned at positions from pos.
bounds defines an optional bounding box, used to suppress drawing when TextBlob bounds does not intersect Surface bounds. If bounds is null, TextBlob bounds is computed from (x, y) and glyphs metrics.
- Parameters:
font- Font used for this runglyphs- glyphs in this runpos- positions of glyphs within the blobbounds- optional run bounding box- Returns:
- this
-
appendRunRSXform
public TextBlobBuilder appendRunRSXform(Font font, short[] glyphs, RSXform[] xform)
-
_nGetFinalizer
@Internal public static long _nGetFinalizer()
-
_nMake
@Internal public static long _nMake()
-
_nBuild
@Internal public static long _nBuild(long ptr)
-
_nAppendRun
@Internal public static void _nAppendRun(long ptr, long fontPtr, short[] glyphs, float x, float y, io.github.humbleui.types.Rect bounds)
-
_nAppendRunPosH
@Internal public static void _nAppendRunPosH(long ptr, long fontPtr, short[] glyphs, float[] xs, float y, io.github.humbleui.types.Rect bounds)
-
_nAppendRunPos
@Internal public static void _nAppendRunPos(long ptr, long fontPtr, short[] glyphs, float[] pos, io.github.humbleui.types.Rect bounds)
-
_nAppendRunRSXform
@Internal public static void _nAppendRunRSXform(long ptr, long fontPtr, short[] glyphs, float[] xform)
-
-