| 539 | } |
| 540 | |
| 541 | std::vector<Float> TextLayout::getLinesWidth() const { |
| 542 | std::vector<Float> lw; |
| 543 | std::size_t total = 0; |
| 544 | for ( const auto& sp : paragraphs ) |
| 545 | total += sp.wrapInfo.wrapsWidth.size(); |
| 546 | lw.reserve( total ); |
| 547 | for ( const auto& sp : paragraphs ) |
| 548 | for ( const auto& ww : sp.wrapInfo.wrapsWidth ) |
| 549 | lw.push_back( ww ); |
| 550 | return lw; |
| 551 | } |
| 552 | |
| 553 | void TextLayout::wrapLayout( const String::View& string, TextLayout& result, |
| 554 | LineWrapMode lineWrapMode, Float wrapWidth, Float vspace, |