Package icyllis.arc3d.sketch
Class ScalerContext
java.lang.Object
icyllis.arc3d.sketch.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
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidgenerateImage(Glyph glyph, Object imageBase, long imageAddress) Generates the contents of glyph.fImage.protected abstract ScalerContext.GlyphMetricsgenerateMetrics(Glyph glyph) protected abstract booleangeneratePath(Glyph glyph, Path dst) Sets the passed path to the glyph outline.final voidfinal bytefinal voidfinal Typefacefinal booleanfinal booleanfinal @NonNull GlyphmakeGlyph(int packedID)
-
Field Details
-
mDesc
-
-
Constructor Details
-
ScalerContext
-
-
Method Details
-
getTypeface
-
getMaskFormat
public final byte getMaskFormat() -
isSubpixel
public final boolean isSubpixel() -
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.
-