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

Function draw_right_text

experiments/human_eval/draw_llm_token_cost_bar.py:73–82  ·  view source on GitHub ↗
(
    draw: ImageDraw.ImageDraw,
    x: float,
    y: float,
    text: str,
    font: ImageFont.FreeTypeFont,
    fill: tuple[int, int, int],
)

Source from the content-addressed store, hash-verified

71
72
73def draw_right_text(
74 draw: ImageDraw.ImageDraw,
75 x: float,
76 y: float,
77 text: str,
78 font: ImageFont.FreeTypeFont,
79 fill: tuple[int, int, int],
80) -> None:
81 tw, th = text_size(draw, text, font)
82 draw.text((x - tw, y - th / 2), text, font=font, fill=fill)
83
84
85def color_for(group: str, name: str) -> tuple[int, int, int]:

Callers 1

draw_pngFunction · 0.70

Calls 1

text_sizeFunction · 0.70

Tested by

no test coverage detected