Package icyllis.arc3d.granite

# Class SubRunContainer.AtlasSubRun

java.lang.Object
icyllis.arc3d.granite.SubRunContainer.SubRun
icyllis.arc3d.granite.SubRunContainer.AtlasSubRun

Direct Known Subclasses:
  `SubRunContainer.DirectMaskSubRun`, `SubRunContainer.TransformedMaskSubRun`

Enclosing class:
  `SubRunContainer`

public abstract static class SubRunContainer.AtlasSubRun extends SubRunContainer.SubRun

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `draw(Canvas canvas, float originX, float originY, Paint paint, GraniteDevice device)`
  `void`
  `fillInstanceData(MeshDrawWriter writer, int offset, int count, float depth)`
  `void`
  `fillInstanceData(MeshDrawWriter writer, int offset, int count, float offsetX, float offsetY, float depth)`
  `Rect2fc`
  `getBounds()`
  `int`
  `getGlyphCount()`
  Returns the number of visible glyphs.
  `int`
  `getMaskFormat()`
  Returns the GPU mask format.
  `int`
  `getMatrixAndFilter(Matrixc localToDevice, float originX, float originY, Matrix outSubRunToLocal, Matrix outSubRunToDevice)`
  Compute sub-run-to-local matrix and sub-run-to-device with the given origin.
  `long`
  `getMemorySize()`
  `int`
  `prepareGlyphs(int start, int end, RecordingContext context)`
  Update atlas for glyphs in the given range if needed, returns the number of glyphs that are updated (may less than end-start if atlas is full).

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### draw

    public void draw(Canvas canvas, float originX, float originY, Paint paint, GraniteDevice device)
    Specified by:
      `draw` in class `SubRunContainer.SubRun`

  - ### getGlyphCount

    public int getGlyphCount()
    Returns the number of visible glyphs.

  - ### getMaskFormat

    public int getMaskFormat()
    Returns the GPU mask format.

  - ### prepareGlyphs

    public int prepareGlyphs(int start, int end, RecordingContext context)
    Update atlas for glyphs in the given range if needed, returns the number of glyphs that are updated (may less than end-start if atlas is full). If an error occurred, returns the bitwise NOT (a negative value).

  - ### fillInstanceData

    public void fillInstanceData(MeshDrawWriter writer, int offset, int count, float depth)
    See Also:
      - `RasterTextStep`

  - ### fillInstanceData

    public void fillInstanceData(MeshDrawWriter writer, int offset, int count, float offsetX, float offsetY, float depth)
    See Also:
      - `RasterTextStep`

  - ### getBounds

    public Rect2fc getBounds()

  - ### getMatrixAndFilter

    public int getMatrixAndFilter(Matrixc localToDevice, float originX, float originY, Matrix outSubRunToLocal, Matrix outSubRunToDevice)
    Compute sub-run-to-local matrix and sub-run-to-device with the given origin. Compute filter based on local-to-device matrix and origin, and return it.

  - ### getMemorySize

    public long getMemorySize()
    Specified by:
      `getMemorySize` in class `SubRunContainer.SubRun`