Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
SkTextBlob::Iter Class Reference

#include <SkTextBlob.h>

Classes

struct  ExperimentalRun
 
struct  Run
 

Public Member Functions

 Iter (const SkTextBlob &)
 
bool next (Run *)
 
bool experimentalNext (ExperimentalRun *)
 

Detailed Description

Definition at line 209 of file SkTextBlob.h.

Constructor & Destructor Documentation

◆ Iter()

SkTextBlob::Iter::Iter ( const SkTextBlob blob)

Definition at line 974 of file SkTextBlob.cpp.

974 {
975 fRunRecord = RunRecord::First(&blob);
976}

Member Function Documentation

◆ experimentalNext()

bool SkTextBlob::Iter::experimentalNext ( ExperimentalRun rec)

Definition at line 1000 of file SkTextBlob.cpp.

1000 {
1001 if (fRunRecord) {
1002 if (rec) {
1003 rec->font = fRunRecord->font();
1004 rec->count = fRunRecord->glyphCount();
1005 rec->glyphs = fRunRecord->glyphBuffer();
1006 rec->positions = fRunRecord->pointBuffer();
1007 }
1008 if (fRunRecord->isLastRun()) {
1009 fRunRecord = nullptr;
1010 } else {
1011 fRunRecord = RunRecord::Next(fRunRecord);
1012 }
1013 return true;
1014 }
1015 return false;
1016}

◆ next()

bool SkTextBlob::Iter::next ( Run rec)

Returns true for each "run" inside the textblob, setting the Run fields (if not null). If this returns false, there are no more runs, and the Run parameter will be ignored.

Definition at line 978 of file SkTextBlob.cpp.

978 {
979 if (fRunRecord) {
980 if (rec) {
981 rec->fTypeface = fRunRecord->font().getTypeface();
982 rec->fGlyphCount = fRunRecord->glyphCount();
983 rec->fGlyphIndices = fRunRecord->glyphBuffer();
984#ifdef SK_UNTIL_CRBUG_1187654_IS_FIXED
985 rec->fClusterIndex_forTest = fRunRecord->clusterBuffer();
986 rec->fUtf8Size_forTest = fRunRecord->textSize();
987 rec->fUtf8_forTest = fRunRecord->textBuffer();
988#endif
989 }
990 if (fRunRecord->isLastRun()) {
991 fRunRecord = nullptr;
992 } else {
993 fRunRecord = RunRecord::Next(fRunRecord);
994 }
995 return true;
996 }
997 return false;
998}

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