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

Function draw_legend

experiments/human_eval/draw_llm_token_cost_ref_bar.py:108–114  ·  view source on GitHub ↗
(draw: ImageDraw.ImageDraw)

Source from the content-addressed store, hash-verified

106
107
108def draw_legend(draw: ImageDraw.ImageDraw) -> None:
109 legend = [("Closed-source Model", CLOSED), ("Open-source Model", OPEN)]
110 x = 565
111 for row_idx, (label, color) in enumerate(legend):
112 y = 13 + row_idx * 38
113 draw.rounded_rectangle((x, y + 11, x + 24, y + 27), radius=4, fill=color)
114 draw.text((x + 34, y), label, font=F_LEGEND, fill=TEXT)
115
116
117def draw_png() -> Image.Image:

Callers 1

draw_pngFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected