(self)
| 97 | # Return the number of rows needed to display the current self.lines |
| 98 | # This number may be > self.rows. |
| 99 | def rows_needed(self): |
| 100 | needed = 0 |
| 101 | for l in self.lines: |
| 102 | if isinstance(l,ImageFCI): |
| 103 | needed += int(self.get_image_padded_height(l.height)/self.font_height) |
| 104 | else: |
| 105 | needed += int((len(l)+(self.cols-1))/self.cols) |
| 106 | return needed |
| 107 | |
| 108 | # When displaying images, we need to start from the row edge in order |
| 109 | # make mixes of images and text well aligned. So we pad the image |
no test coverage detected