MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / set_text_alignment_between

Method set_text_alignment_between

src/RichText/TextBox.cpp:664–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664void TextBox::set_text_alignment_between(size_t paragraphIndex1, size_t paragraphIndex2, skia::textlayout::TextAlign newAlignment) {
665 auto [start, end] = get_start_end_paragraph_pos(paragraphIndex1, paragraphIndex2);
666 bool anythingChanged = false;
667 for(size_t i = start; i <= end; i++) {
668 if(paragraphs[i].pStyleData.textAlignment != newAlignment) {
669 anythingChanged = true;
670 paragraphs[i].pStyleData.textAlignment = newAlignment;
671 }
672 }
673 if(anythingChanged) {
674 needsRebuild = true;
675 }
676}
677
678void TextBox::set_text_direction_between(size_t paragraphIndex1, size_t paragraphIndex2, skia::textlayout::TextDirection newDirection) {
679 auto [start, end] = get_start_end_paragraph_pos(paragraphIndex1, paragraphIndex2);

Callers 2

edit_guiMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected