Package icyllis.arc3d.sketch
Class Strike
java.lang.Object
icyllis.arc3d.sketch.Strike
The font strike holds the results from
ScalerContext.-
Constructor Summary
ConstructorsConstructorDescriptionStrike(@NonNull StrikeCache strikeCache, @NonNull StrikeDesc strikeDesc, @NonNull ScalerContext scalerContext) -
Method Summary
Modifier and TypeMethodDescription@NonNull GlyphdigestFor(int actionType, int packedID) Find or create a glyph for the given glyph ID, return the pointer to it.@NonNull GlyphgetGlyph(int packedID) Find or create a glyph for the given glyph ID, return the pointer to it.Glyph @NonNull []getMetrics(int @NonNull [] glyphs, int glyphOffset, int glyphCount, Glyph @NonNull [] results) Compute metrics for a list of glyphs in bulk.@NonNull StrikeDescintfloatvoidlock()booleanprepareForImage(@NonNull Glyph glyph) Prepare the glyph to draw an image, and return if the image exists.booleanprepareForPath(Glyph glyph) Prepare the glyph to draw a path, and return if the path exists.voidunlock()
-
Constructor Details
-
Strike
@Internal public Strike(@NonNull StrikeCache strikeCache, @NonNull StrikeDesc strikeDesc, @NonNull ScalerContext scalerContext)
-
-
Method Details
-
lock
public void lock() -
unlock
public void unlock() -
getGlyph
Find or create a glyph for the given glyph ID, return the pointer to it.Requires lock.
- Parameters:
packedID- typeface-specified glyph ID
-
digestFor
Find or create a glyph for the given glyph ID, return the pointer to it. Get or compute the digest for the given action type, ensure thatGlyph.actionFor(int)is set.Requires lock.
- Parameters:
actionType- e.g.Glyph.kDirectMaskpackedID- typeface-specified glyph ID
-
prepareForImage
Prepare the glyph to draw an image, and return if the image exists.Requires lock.
-
prepareForPath
Prepare the glyph to draw a path, and return if the path exists.Requires lock.
-
getMetrics
public Glyph @NonNull [] getMetrics(int @NonNull [] glyphs, int glyphOffset, int glyphCount, Glyph @NonNull [] results) Compute metrics for a list of glyphs in bulk. The glyph metrics within the given range will be computed, and the glyph pointers will be stored in the results array and returned.Excludes lock.
-
getStrikeDesc
-
getSubpixelRounding
public float getSubpixelRounding() -
getSubpixelFieldMask
public int getSubpixelFieldMask()
-