MCPcopy Create free account
hub / github.com/microsoft/TypeChat / draw_arrow

Function draw_arrow

python/examples/drawing/render.py:44–55  ·  view source on GitHub ↗
(arrow: Arrow)

Source from the content-addressed store, hash-verified

42 canvas.create_text((x1 + x2) / 2, (y1 + y2) / 2, text=ellipse.text, fill="black")
43
44 def draw_arrow(arrow: Arrow):
45 line_style = getattr(arrow.style, "line_style", None) or "solid"
46 dash = dash_pattern.get(line_style, dash_pattern["solid"])
47 canvas.create_line(
48 arrow.start_x,
49 arrow.start_y,
50 arrow.end_x,
51 arrow.end_y,
52 dash=dash,
53 arrow=tk.LAST,
54 fill=getattr(arrow.style, "line_color", None) or "black",
55 )
56
57 for item in drawing.items:
58 match item:

Callers 1

render_drawingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…