MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / draw_ttf

Method draw_ttf

pager/pagerctl.py:414–416  ·  view source on GitHub ↗

Draw text using TTF font. Returns width or -1 on error.

(self, x, y, text, color, font_path, font_size)

Source from the content-addressed store, hash-verified

412
413 # TTF text
414 def draw_ttf(self, x, y, text, color, font_path, font_size):
415 """Draw text using TTF font. Returns width or -1 on error."""
416 return _lib.pager_draw_ttf(x, y, text.encode(), color, font_path.encode(), font_size)
417
418 def ttf_width(self, text, font_path, font_size):
419 """Get width of TTF text in pixels."""

Callers 11

_draw_screen_headerMethod · 0.45
_draw_stat_cardMethod · 0.45
draw_dashboardMethod · 0.45
draw_hostsMethod · 0.45
draw_credentialsMethod · 0.45
draw_vulnerabilitiesMethod · 0.45
drawMethod · 0.45
_draw_settings_screenMethod · 0.45
draw_menuMethod · 0.45
_draw_main_menuMethod · 0.45
_confirmMethod · 0.45

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected