MCPcopy Create free account
hub / github.com/JacquesLucke/code_autocomplete / get_draw_lines

Method get_draw_lines

graphics.py:129–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 return width, height
128
129 def get_draw_lines(self):
130 text_lines = self.get_wrapped_lines()
131 draw_lines = text_lines[:self.max_lines]
132
133 if len(text_lines) > self.max_lines:
134 last_line = draw_lines[-1] + "..."
135 if self.fits_in_line(last_line):
136 draw_lines[-1] = last_line
137 else: draw_lines[-1] = draw_lines[-1][:-3] + "..."
138
139 return draw_lines
140
141 def get_wrapped_lines(self):
142 lines = []

Callers 4

drawMethod · 0.95
get_draw_dimensionsMethod · 0.95

Calls 2

get_wrapped_linesMethod · 0.95
fits_in_lineMethod · 0.95

Tested by

no test coverage detected