File: test.py

package info (click to toggle)
kaa-imlib2 0.2.3%2Bsvn4596-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 484 kB
  • ctags: 351
  • sloc: ansic: 1,219; python: 529; makefile: 73
file content (14 lines) | stat: -rw-r--r-- 302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python
import kaa.imlib2

# FIXME: flesh this out.

img = kaa.imlib2.new((640, 480))
img.draw_ellipse((50, 50), (50, 50), (255, 0, 0))
assert(img.get_pixel((75, 75)) == (255, 0, 0, 255))
img2 = img.copy()
img2.blur(20)
img2.flip_horizontal()

img.blend(img2, alpha=100)
img.save('test.png')