Package icyllis.arc3d.core
Class ScalerContext
java.lang.Object
icyllis.arc3d.core.ScalerContext
- Direct Known Subclasses:
ScalerContext_JDK
The ScalerContext controls the rasterization with a specified typeface
and rasterization options.
This class is not thread safe, even it is stateless.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
generateImage
(Glyph glyph, Object imageBase, long imageAddress) Generates the contents of glyph.fImage.protected abstract ScalerContext.GlyphMetrics
generateMetrics
(Glyph glyph) protected abstract boolean
generatePath
(Glyph glyph, Path dst) Sets the passed path to the glyph outline.final void
final byte
final void
final Typeface
final boolean
final Glyph
makeGlyph
(int glyphID)
-
Field Details
-
mDesc
-
-
Constructor Details
-
ScalerContext
-
-
Method Details
-
getTypeface
-
getMaskFormat
public final byte getMaskFormat() -
isLinearMetrics
public final boolean isLinearMetrics() -
makeGlyph
-
getImage
-
getPath
-
generateMetrics
-
generateImage
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
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.
-