Class BakedTextBlob

java.lang.Object
icyllis.arc3d.granite.BakedTextBlob

public final class BakedTextBlob extends Object
A BakedTextBlob contains a fully processed TextBlob, suitable for nearly immediate drawing on the GPU. These are initially created with valid positions and colors, but with invalid texture coordinates.

A BakedTextBlob contains a number of SubRuns that are created in the blob's arena. Each SubRun tracks its own glyph and position data.

In these classes, I'm trying to follow the convention about matrices and origins.

  • drawMatrix and drawOrigin - describes transformations for the current draw command.
  • positionMatrix - is equal to drawMatrix * [drawOrigin-as-translation-matrix]
  • initial Matrix - describes the combined initial matrix and origin the TextBlob was created with.
  • Constructor Details

  • Method Details

    • make

      public static @NonNull BakedTextBlob make(@NonNull GlyphRunList glyphRunList, @NonNull Paint paint, @NonNull Matrixc positionMatrix, @NonNull StrikeCache strikeCache)
    • draw

      public void draw(Canvas canvas, float originX, float originY, Paint paint, GraniteDevice device)
    • canReuse

      @Contract(pure=true) public boolean canReuse(@NonNull Paint paint, @NonNull Matrixc positionMatrix, float glyphRunListX, float glyphRunListY)
    • getMemorySize

      public long getMemorySize()