MCPcopy Create free account
hub / github.com/crossuo/crossuo / GetLinesCountA

Method GetLinesCountA

src/TextEngine/EntryText.cpp:125–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125int CEntryText::GetLinesCountA(uint8_t font, TEXT_ALIGN_TYPE align, uint16_t flags, int width)
126{
127 if (width == 0)
128 {
129 width = Width;
130 }
131
132 auto *info = g_FontManager.GetInfoA(font, GetTextA(), align, flags, width);
133 int count = 0;
134 while (info != nullptr)
135 {
136 auto *next = info->m_Next;
137 delete info;
138 info = next;
139 count++;
140 }
141
142 return count;
143}
144
145int CEntryText::GetLinesCountW(uint8_t font, TEXT_ALIGN_TYPE align, uint16_t flags, int width)
146{

Callers 2

InsertInContentMethod · 0.80
OnTextInputMethod · 0.80

Calls 1

GetInfoAMethod · 0.80

Tested by

no test coverage detected