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

#include <SkOTTable_glyf.h>

Public Member Functions

 Iterator (SkOTTableGlyph &glyf, const SkOTTableIndexToLocation &loca, SkOTTableHead::IndexToLocFormat locaFormat)
 
void advance (uint16_t num)
 
SkOTTableGlyphDatanext ()
 

Detailed Description

Definition at line 27 of file SkOTTable_glyf.h.

Constructor & Destructor Documentation

◆ Iterator()

SkOTTableGlyph::Iterator::Iterator ( SkOTTableGlyph glyf,
const SkOTTableIndexToLocation loca,
SkOTTableHead::IndexToLocFormat  locaFormat 
)
inline

Definition at line 29 of file SkOTTable_glyf.h.

32 : fGlyf(glyf)
33 , fLoca(loca)
34 , fLocaFormat(locaFormat)
35 , fCurrentGlyph(0)
36 , fCurrentGlyphOffset(0)
37 {
40 }
#define SkASSERT(cond)
Definition SkAssert.h:116
enum SkOTTableHead::IndexToLocFormat::Value value

Member Function Documentation

◆ advance()

void SkOTTableGlyph::Iterator::advance ( uint16_t  num)
inline

Definition at line 42 of file SkOTTable_glyf.h.

42 {
43 fCurrentGlyph += num;
45 fCurrentGlyphOffset =
46 SkEndian_SwapBE16(fLoca.offsets.shortOffset[fCurrentGlyph]) << 1;
47 } else if (fLocaFormat.value == SkOTTableHead::IndexToLocFormat::LongOffsets) {
48 fCurrentGlyphOffset = SkEndian_SwapBE32(fLoca.offsets.longOffset[fCurrentGlyph]);
49 }
50 }
#define SkEndian_SwapBE32(n)
Definition SkEndian.h:136
#define SkEndian_SwapBE16(n)
Definition SkEndian.h:135
union SkOTTableIndexToLocation::Offsets offsets

◆ next()

SkOTTableGlyphData * SkOTTableGlyph::Iterator::next ( )
inline

Definition at line 51 of file SkOTTable_glyf.h.

51 {
52 uint32_t previousGlyphOffset = fCurrentGlyphOffset;
53 advance(1);
54 if (previousGlyphOffset == fCurrentGlyphOffset) {
55 return nullptr;
56 } else {
57 return reinterpret_cast<SkOTTableGlyphData*>(
58 reinterpret_cast<SK_OT_BYTE*>(&fGlyf) + previousGlyphOffset
59 );
60 }
61 }
uint8_t SK_OT_BYTE
void advance(uint16_t num)

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