MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / text_box

Function text_box

experiments/human_eval/draw_error_analysis_figure.py:142–144  ·  view source on GitHub ↗
(draw: ImageDraw.ImageDraw, text: str, font: ImageFont.FreeTypeFont)

Source from the content-addressed store, hash-verified

140
141
142def text_box(draw: ImageDraw.ImageDraw, text: str, font: ImageFont.FreeTypeFont) -> tuple[int, int]:
143 box = draw.textbbox((0, 0), text, font=font)
144 return box[2] - box[0], box[3] - box[1]
145
146
147def wrap_lines(text: str, chars: int) -> list[str]:

Callers 4

draw_centeredFunction · 0.85
draw_wrapped_textFunction · 0.85
draw_badgeFunction · 0.85
draw_cardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected