diff options
Diffstat (limited to 'reader/test.py')
| -rwxr-xr-x | reader/test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/reader/test.py b/reader/test.py new file mode 100755 index 0000000..b260314 --- /dev/null +++ b/reader/test.py | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/usr/bin/python | ||
| 2 | |||
| 3 | import cairo | ||
| 4 | |||
| 5 | if __name__ == '__main__': | ||
| 6 | surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 500, 500) | ||
| 7 | ctx = cairo.Context(surface) | ||
| 8 | ctx.move_to(10, 10) | ||
| 9 | ctx.line_to(-100, 10) | ||
| 10 | ctx.set_line_width(2) | ||
| 11 | |||
| 12 | ctx.move_to(10, 10) | ||
| 13 | ctx.line_to(20, 10) | ||
| 14 | ctx.stroke() | ||
| 15 | surface.write_to_png('test.png') | ||
