Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
LineBreakIter Class Reference

Public Member Functions

 LineBreakIter (CTTypesetterRef ts, SkScalar width)
 
SkUniqueCFRef< CTLineRef > nextLine ()
 

Detailed Description

Definition at line 64 of file SkShaper_coretext.cpp.

Constructor & Destructor Documentation

◆ LineBreakIter()

LineBreakIter::LineBreakIter ( CTTypesetterRef  ts,
SkScalar  width 
)
inline

Definition at line 70 of file SkShaper_coretext.cpp.

70 : fTypesetter(ts), fWidth(width) {
71 fStart = 0;
72 }
int32_t width

Member Function Documentation

◆ nextLine()

SkUniqueCFRef< CTLineRef > LineBreakIter::nextLine ( )
inline

Definition at line 74 of file SkShaper_coretext.cpp.

74 {
75 CFRange stringRange {fStart, CTTypesetterSuggestLineBreak(fTypesetter, fStart, fWidth)};
76 if (stringRange.length == 0) {
77 return nullptr;
78 }
79 fStart += stringRange.length;
80 return SkUniqueCFRef<CTLineRef>(CTTypesetterCreateLine(fTypesetter, stringRange));
81 }

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