(context)
| 2 | |
| 3 | |
| 4 | def 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 | |
| 21 | def draw_box(context, x, y, x2, y2): |