Class ScalerContext

java.lang.Object
icyllis.arc3d.core.ScalerContext
Direct Known Subclasses:
ScalerContext_JDK

public abstract class ScalerContext extends Object
The ScalerContext controls the rasterization with a specified typeface and rasterization options.

This class is not thread safe, even it is stateless.

  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • getTypeface Link icon

      public final Typeface getTypeface()
    • getMaskFormat Link icon

      public final byte getMaskFormat()
    • isLinearMetrics Link icon

      public final boolean isLinearMetrics()
    • makeGlyph Link icon

      @Nonnull public final Glyph makeGlyph(int glyphID)
    • getImage Link icon

      public final void getImage(Glyph glyph)
    • getPath Link icon

      public final void getPath(@Nonnull Glyph glyph)
    • generateMetrics Link icon

      protected abstract ScalerContext.GlyphMetrics generateMetrics(Glyph glyph)
    • generateImage Link icon

      protected abstract void generateImage(Glyph glyph, Object imageBase, long imageAddress)
      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.

    • generatePath Link icon

      protected abstract boolean generatePath(Glyph glyph, Path dst)
      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.
      Returns:
      false if this glyph does not have any path.