MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / findLineForIndex

Method findLineForIndex

src/core/objects/text_object.cpp:356–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356int TextObject::findLineForIndex(int index) const
357{
358 int line_num = 0;
359 for (int line = 1; line < getNumLines(); ++line)
360 {
361 const TextObjectLineInfo* line_info = getLineInfo(line);
362 if (index < line_info->start_index)
363 break;
364 line_num = line;
365 }
366 return line_num;
367}
368
369const TextObjectLineInfo& TextObject::findLineInfoForIndex(int index) const
370{

Callers 1

keyPressEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected