Package icyllis.arc3d.core.j2d

# Class ScalerContext_JDK

java.lang.Object
icyllis.arc3d.core.ScalerContext
icyllis.arc3d.core.j2d.ScalerContext_JDK

public class ScalerContext_JDK extends ScalerContext
Wraps Java2D's freetype scaler.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.core.ScalerContext

  `ScalerContext.GlyphMetrics`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.core.ScalerContext

  `mDesc`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScalerContext_JDK(Typeface_JDK typeface, StrikeDesc desc)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `generateImage(Glyph glyph, Object imageBase, long imageAddress)`
  Generates the contents of glyph.fImage.
  `protected ScalerContext.GlyphMetrics`
  `generateMetrics(Glyph glyph)`
  `protected boolean`
  `generatePath(Glyph glyph, Path dst)`
  Sets the passed path to the glyph outline.

  ### Methods inherited from class icyllis.arc3d.core.ScalerContext

  `getImage, getMaskFormat, getPath, getTypeface, isLinearMetrics, makeGlyph`

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

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

- ## Constructor Details

  - ### ScalerContext_JDK

    public ScalerContext_JDK(Typeface_JDK typeface, StrikeDesc desc)

- ## Method Details

  - ### generateMetrics

    protected ScalerContext.GlyphMetrics generateMetrics(Glyph glyph)
    Specified by:
      `generateMetrics` in class `ScalerContext`

  - ### generateImage

    protected void generateImage(Glyph glyph, Object imageBase, long imageAddress)
    Description copied from class: `ScalerContext`
    Generates the contents of glyph.fImage. When called, glyph.fImage will be pointing to a pre-allocated, uninitialized region of memory of size glyph.imageSize(). This method may not change glyph.fMaskFormat.

    Because glyph.imageSize() will determine the size of fImage, generateMetrics will be called before generateImage.

    Specified by:
      `generateImage` in class `ScalerContext`

  - ### generatePath

    protected boolean generatePath(Glyph glyph, Path dst)
    Description copied from class: `ScalerContext`
    Sets the passed path to the glyph outline. If this cannot be done the path is set to empty; Does not apply subpixel positioning to the path.
    Specified by:
      `generatePath` in class `ScalerContext`
    Returns:
      false if this glyph does not have any path.