MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / blank

Method blank

examples/space_invaders/space_invaders.py:179–190  ·  view source on GitHub ↗

Render a blank box for this glyph's position and size.

(self, window)

Source from the content-addressed store, hash-verified

177 window.addstr(self.y, self.x - len(self.label), label)
178
179 def blank(self, window):
180 """Render a blank box for this glyph's position and size."""
181
182 glyph = self.glyph
183 x = min(max(self.x, 0), MAX_X)
184 width = min(glyph.width, MAX_X - x) or 1
185 for y_a in range(self.y, self.y + glyph.height):
186 y = y_a
187 window.addstr(y + VERT_PADDING, x + HORIZ_PADDING, " " * width)
188
189 if self.label:
190 self._render_label(window, True)
191
192 @hybrid_property
193 def width(self):

Callers 8

move_saucerFunction · 0.95
render_messageFunction · 0.80
pauseFunction · 0.80
move_armyFunction · 0.80
move_playerFunction · 0.80
move_missileFunction · 0.80
update_splatFunction · 0.80
scoreFunction · 0.80

Calls 3

_render_labelMethod · 0.95
minClass · 0.85
maxClass · 0.85

Tested by

no test coverage detected