MCPcopy
hub / github.com/yosinski/deep-visualization-toolbox / draw_help

Method draw_help

live_vis.py:333–354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

331 self.panes['input'].data[:] = frame_disp
332
333 def draw_help(self):
334 self.help_buffer[:] = self.help_buffer[:] * .7
335 self.help_pane.data[:] = self.help_pane.data[:] * .7
336
337 loc = self.settings.help_loc[::-1] # Reverse to OpenCV c,r order
338 defaults = self.help_pane_defaults
339 lines = []
340 lines.append([FormattedString('~ ~ ~ Deep Visualization Toolbox ~ ~ ~', defaults, align='center', width=self.help_pane.j_size)])
341 lines.append([FormattedString('', defaults)])
342 lines.append([FormattedString('Base keys', defaults)])
343
344 for tag in ('help_mode', 'freeze_cam', 'toggle_input_mode', 'static_file_increment', 'static_file_decrement', 'stretch_mode', 'quit'):
345 key_strings, help_string = self.bindings.get_key_help(tag)
346 label = '%10s:' % (','.join(key_strings))
347 lines.append([FormattedString(label, defaults, width=120, align='right'),
348 FormattedString(help_string, defaults)])
349
350 locy = cv2_typeset_text(self.help_pane.data, lines, loc,
351 line_spacing = self.settings.help_line_spacing)
352
353 for app_name, app in self.apps.iteritems():
354 locy = app.draw_help(self.help_pane, locy)
355
356
357

Callers 1

run_loopMethod · 0.95

Calls 3

FormattedStringClass · 0.90
cv2_typeset_textFunction · 0.90
get_key_helpMethod · 0.80

Tested by

no test coverage detected