Append a single line of text. Args: line: (str) The text to be added to the end. font_attr_segs: (list of tuples) Font attribute segments of the appended line.
(self, line, font_attr_segs=None)
| 332 | self._annotations = new_annotations |
| 333 | |
| 334 | def append(self, line, font_attr_segs=None): |
| 335 | """Append a single line of text. |
| 336 | |
| 337 | Args: |
| 338 | line: (str) The text to be added to the end. |
| 339 | font_attr_segs: (list of tuples) Font attribute segments of the appended |
| 340 | line. |
| 341 | """ |
| 342 | |
| 343 | self._lines.append(line) |
| 344 | if font_attr_segs: |
| 345 | self._font_attr_segs[len(self._lines) - 1] = font_attr_segs |
| 346 | |
| 347 | def append_rich_line(self, rich_line): |
| 348 | self.append(rich_line.text, rich_line.font_attr_segs) |