OpenTTD Source 20260218-master-g2123fca5ea
CoreTextParagraphLayout::CoreTextLine Class Reference

A single line worth of VisualRuns. More...

Inheritance diagram for CoreTextParagraphLayout::CoreTextLine:
ParagraphLayouter::Line

Public Member Functions

 CoreTextLine (CFAutoRelease< CTLineRef > line, const FontMap &font_mapping, const CoreTextParagraphLayoutFactory::CharType *buff)
int GetLeading () const override
 Get the height of the line.
int GetWidth () const override
 Get the width of this line.
size_t CountRuns () const override
 Get the number of runs in this line.
const VisualRunGetVisualRun (size_t run) const override
 Get a reference to the given run.
int GetInternalCharLength (char32_t c) const override
 Get the number of elements the given character occupies in the underlying text buffer of the Layouter.

Detailed Description

A single line worth of VisualRuns.

Definition at line 69 of file string_osx.cpp.

Constructor & Destructor Documentation

◆ CoreTextLine()

CoreTextParagraphLayout::CoreTextLine::CoreTextLine ( CFAutoRelease< CTLineRef > line,
const FontMap & font_mapping,
const CoreTextParagraphLayoutFactory::CharType * buff )
inline

Definition at line 71 of file string_osx.cpp.

Member Function Documentation

◆ CountRuns()

size_t CoreTextParagraphLayout::CoreTextLine::CountRuns ( ) const
inlineoverridevirtual

Get the number of runs in this line.

Returns
The number of runs.

Implements ParagraphLayouter::Line.

Definition at line 87 of file string_osx.cpp.

◆ GetInternalCharLength()

int CoreTextParagraphLayout::CoreTextLine::GetInternalCharLength ( char32_t c) const
inlineoverridevirtual

Get the number of elements the given character occupies in the underlying text buffer of the Layouter.

Many use UTF-16 internally, meaning a character larger than MAX_UINT16 occupies two places in its buffer.

Parameters
cThe character to get the length for.
Returns
The length.

Implements ParagraphLayouter::Line.

Definition at line 90 of file string_osx.cpp.

◆ GetLeading()

int CoreTextParagraphLayout::CoreTextLine::GetLeading ( ) const
overridevirtual

Get the height of the line.

Returns
The maximum height of the line.

Implements ParagraphLayouter::Line.

Definition at line 241 of file string_osx.cpp.

◆ GetVisualRun()

const VisualRun & CoreTextParagraphLayout::CoreTextLine::GetVisualRun ( size_t run) const
inlineoverridevirtual

Get a reference to the given run.

Parameters
runThe index into the runs.
Returns
The reference to the run.

Implements ParagraphLayouter::Line.

Definition at line 88 of file string_osx.cpp.

◆ GetWidth()

int CoreTextParagraphLayout::CoreTextLine::GetWidth ( ) const
overridevirtual

Get the width of this line.

Returns
The width of the line.

Implements ParagraphLayouter::Line.

Definition at line 255 of file string_osx.cpp.


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