fastplotlib.TextBox#
- class TextBox(font_size=12, text_color='w', background_color=(0.1, 0.1, 0.3, 0.95), outline_color=(0.8, 0.8, 1.0, 1.0), padding=(5, 5))[source]#
Create a Textbox
- Parameters:
font_size (int, default 12) – text font size
text_color (str | pygfx.Color | tuple, default "w") – text color, interpretable by pygfx.Color
background_color (str | pygfx.Color | tuple, default (0.1, 0.1, 0.3, 0.95),) – background color, interpretable by pygfx.Color
outline_color (str | pygfx.Color | tuple, default (0.8, 0.8, 1.0, 1.0)) – outline color, interpretable by pygfx.Color
padding ((float, float), default (5, 5)) – the amount of pixels in (x, y) by which to extend the rectangle behind the text