Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SkBulkGlyphMetricsAndPaths Class Reference

#include <SkStrikeSpec.h>

Public Member Functions

 SkBulkGlyphMetricsAndPaths (const SkStrikeSpec &spec)
 
 SkBulkGlyphMetricsAndPaths (sk_sp< SkStrike > &&strike)
 
 ~SkBulkGlyphMetricsAndPaths ()
 
SkSpan< const SkGlyph * > glyphs (SkSpan< const SkGlyphID > glyphIDs)
 
const SkGlyphglyph (SkGlyphID glyphID)
 
void findIntercepts (const SkScalar bounds[2], SkScalar scale, SkScalar xPos, const SkGlyph *glyph, SkScalar *array, int *count)
 

Detailed Description

Definition at line 128 of file SkStrikeSpec.h.

Constructor & Destructor Documentation

◆ SkBulkGlyphMetricsAndPaths() [1/2]

SkBulkGlyphMetricsAndPaths::SkBulkGlyphMetricsAndPaths ( const SkStrikeSpec spec)
explicit

Definition at line 199 of file SkStrikeSpec.cpp.

200 : fStrike{spec.findOrCreateStrike()} { }
sk_sp< SkStrike > findOrCreateStrike() const

◆ SkBulkGlyphMetricsAndPaths() [2/2]

SkBulkGlyphMetricsAndPaths::SkBulkGlyphMetricsAndPaths ( sk_sp< SkStrike > &&  strike)
explicit

Definition at line 202 of file SkStrikeSpec.cpp.

203 : fStrike{std::move(strike)} { }

◆ ~SkBulkGlyphMetricsAndPaths()

SkBulkGlyphMetricsAndPaths::~SkBulkGlyphMetricsAndPaths ( )
default

Member Function Documentation

◆ findIntercepts()

void SkBulkGlyphMetricsAndPaths::findIntercepts ( const SkScalar  bounds[2],
SkScalar  scale,
SkScalar  xPos,
const SkGlyph glyph,
SkScalar array,
int count 
)

Definition at line 216 of file SkStrikeSpec.cpp.

218 {
219 // TODO(herb): remove this abominable const_cast. Do the intercepts really need to be on the
220 // glyph?
221 fStrike->findIntercepts(bounds, scale, xPos, const_cast<SkGlyph*>(glyph), array, count);
222}
int count
const SkGlyph * glyph(SkGlyphID glyphID)
void findIntercepts(const SkScalar bounds[2], SkScalar scale, SkScalar xPos, SkGlyph *, SkScalar *array, int *count) SK_EXCLUDES(fStrikeLock)
Definition SkStrike.cpp:212
const Scalar scale

◆ glyph()

const SkGlyph * SkBulkGlyphMetricsAndPaths::glyph ( SkGlyphID  glyphID)

Definition at line 212 of file SkStrikeSpec.cpp.

212 {
213 return this->glyphs(SkSpan<const SkGlyphID>{&glyphID, 1})[0];
214}
uint16_t glyphs[5]

◆ glyphs()

SkSpan< const SkGlyph * > SkBulkGlyphMetricsAndPaths::glyphs ( SkSpan< const SkGlyphID glyphIDs)

Definition at line 207 of file SkStrikeSpec.cpp.

207 {
208 fGlyphs.reset(glyphIDs.size());
209 return fStrike->preparePaths(glyphIDs, fGlyphs.get());
210}
constexpr size_t size() const
Definition SkSpan_impl.h:95
SkSpan< const SkGlyph * > preparePaths(SkSpan< const SkGlyphID > glyphIDs, const SkGlyph *results[]) SK_EXCLUDES(fStrikeLock)
Definition SkStrike.cpp:224

The documentation for this class was generated from the following files: