Debian Codegraph @

examples/cairo_snippets/snippets/fill_and_stroke2.py

raw symbols SCIP
1 def draw(cr, width, height):
2 cr.scale(width, height)
3 cr.set_line_width(0.04)
4
5 cr.move_to(0.5, 0.1)
6 cr.line_to(0.9, 0.9)
7 cr.rel_line_to(-0.4, 0.0)
8 cr.curve_to(0.2, 0.9, 0.2, 0.5, 0.5, 0.5)
9 cr.close_path()
10
11 cr.move_to(0.25, 0.1)
12 cr.rel_line_to(0.2, 0.2)
13 cr.rel_line_to(-0.2, 0.2)
14 cr.rel_line_to(-0.2, -0.2)
15 cr.close_path()
16
17 cr.set_source_rgb(0, 0, 1)
18 cr.fill_preserve()
19 cr.set_source_rgb(0, 0, 0)
20 cr.stroke()