Package icyllis.arc3d.core

# Class Glyph

java.lang.Object
icyllis.arc3d.core.Glyph

public final class Glyph extends Object
Represents a CPU glyph + digest information for GPU drawing, managed by `Strike`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `BILERP_GLYPH_BORDER`
  `static final int`
  `kAccept_Action`
  Action for methods.
  `static final int`
  `kDirectMask`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kDrawable`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kDrop_Action`
  Action for methods.
  `static final int`
  `kMSDF`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kPath`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kReject_Action`
  Action for methods.
  `static final int`
  `kSDF`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kTransformedMask`
  Text rendering methods, values are used as bit shift to obtain action.
  `static final int`
  `kUnset_Action`
  Action for methods.
  `static final int`
  `MAX_ATLAS_DIMENSION`
  `static final int`
  `MAX_BILERP_ATLAS_DIMENSION`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Glyph(int id)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `actionFor(int actionType)`
  Returns the action result for the given text rendering method.
  `void`
  `getBounds(Rect2f dst)`
  Returns the bounding box for this glyph, it holds rounded integer values.
  `void`
  `getBounds(Rect2i dst)`
  Returns the bounding box for this glyph.
  `int`
  `getGlyphID()`
  `int`
  `getHeight()`
  `long`
  `getImageAddress()`
  `Object`
  `getImageBase()`
  `int`
  `getImageSize()`
  `int`
  `getLeft()`
  The bearing X.
  `byte`
  `getMaskFormat()`
  `int`
  `getMaxDimension()`
  Returns the largest dimension ( max(width, height) ).
  `Path`
  `getPath()`
  `int`
  `getRowBytes()`
  `int`
  `getTop()`
  The bearing Y.
  `int`
  `getWidth()`
  `boolean`
  `imageIsTooLarge()`
  `boolean`
  `isColor()`
  `boolean`
  `isEmpty()`
  `boolean`
  `setImage(ScalerContext scalerContext)`
  `boolean`
  `setImageHasBeenCalled()`
  `boolean`
  `setPath(Path path)`
  `boolean`
  `setPath(ScalerContext scalerContext)`
  `boolean`
  `setPathHasBeenCalled()`

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

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

- ## Field Details

  - ### kUnset_Action

    public static final int kUnset_Action
    Action for methods.
    See Also:
      - Constant Field Values

  - ### kAccept_Action

    public static final int kAccept_Action
    Action for methods.
    See Also:
      - Constant Field Values

  - ### kReject_Action

    public static final int kReject_Action
    Action for methods.
    See Also:
      - Constant Field Values

  - ### kDrop_Action

    public static final int kDrop_Action
    Action for methods.
    See Also:
      - Constant Field Values

  - ### kDirectMask

    public static final int kDirectMask
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### kTransformedMask

    public static final int kTransformedMask
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### kPath

    public static final int kPath
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### kDrawable

    public static final int kDrawable
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### kSDF

    public static final int kSDF
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### kMSDF

    public static final int kMSDF
    Text rendering methods, values are used as bit shift to obtain action.
    See Also:
      - `actionFor(int)`
      - Constant Field Values

  - ### BILERP_GLYPH_BORDER

    public static final int BILERP_GLYPH_BORDER
    See Also:
      - Constant Field Values

  - ### MAX_ATLAS_DIMENSION

    public static final int MAX_ATLAS_DIMENSION
    See Also:
      - Constant Field Values

  - ### MAX_BILERP_ATLAS_DIMENSION

    public static final int MAX_BILERP_ATLAS_DIMENSION
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Glyph

    public Glyph(int id)

- ## Method Details

  - ### getGlyphID

    public int getGlyphID()

  - ### getLeft

    public int getLeft()
    The bearing X.

  - ### getTop

    public int getTop()
    The bearing Y.

  - ### getWidth

    public int getWidth()

  - ### getHeight

    public int getHeight()

  - ### getMaxDimension

    public int getMaxDimension()
    Returns the largest dimension ( max(width, height) ).

  - ### getBounds

    public void getBounds(@Nonnull Rect2i dst)
    Returns the bounding box for this glyph.

    This may an exact bounding box or just a bounds of all control points, also known as pixel bounds.

  - ### getBounds

    public void getBounds(@Nonnull Rect2f dst)
    Returns the bounding box for this glyph, it holds rounded integer values.

    This may an exact bounding box or just a bounds of all control points, also known as pixel bounds.

  - ### isEmpty

    public boolean isEmpty()

  - ### getMaskFormat

    public byte getMaskFormat()

  - ### isColor

    public boolean isColor()

  - ### imageIsTooLarge

    public boolean imageIsTooLarge()

  - ### setImage

    public boolean setImage(ScalerContext scalerContext)

  - ### setImageHasBeenCalled

    public boolean setImageHasBeenCalled()

  - ### getImageBase

    public Object getImageBase()

  - ### getImageAddress

    public long getImageAddress()

  - ### getRowBytes

    public int getRowBytes()

  - ### getImageSize

    public int getImageSize()

  - ### setPath

    public boolean setPath(ScalerContext scalerContext)

  - ### setPath

    public boolean setPath(Path path)

  - ### setPathHasBeenCalled

    public boolean setPathHasBeenCalled()

  - ### getPath

    public Path getPath()

  - ### actionFor

    public int actionFor(int actionType)
    Returns the action result for the given text rendering method.
    Parameters:
      `actionType` - e.g. `kDirectMask`