MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / draw

Function draw

25_vector_graphics/python/cairodraw.py:4–18  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

2
3
4def draw(context):
5 x, y, x1, y1 = 0.1, 0.5, 0.4, 0.9
6 x2, y2, x3, y3 = 0.6, 0.1, 0.9, 0.5
7 context.scale(200, 200)
8 context.set_line_width(0.04)
9 context.move_to(x, y)
10 context.curve_to(x1, y1, x2, y2, x3, y3)
11 context.stroke()
12 context.set_source_rgba(1, 0.2, 0.2, 0.6)
13 context.set_line_width(0.02)
14 context.move_to(x, y)
15 context.line_to(x1, y1)
16 context.move_to(x2, y2)
17 context.line_to(x3, y3)
18 context.stroke()
19
20
21def draw_box(context, x, y, x2, y2):

Callers 1

cairodraw.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected