diff options
| author | Georg Brandl <georg@python.org> | 2010-12-30 21:33:07 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-12-30 21:33:07 (GMT) |
| commit | 7fafbc95c0c963438197c9a43fe893c4ea6fe759 (patch) | |
| tree | 5c9ceda4bdc5260236a230554b9ed56b8c0cdbd3 /Demo/tkinter/guido/imagedraw.py | |
| parent | 6f17e2df29a865a29447531e89fb22be710e382d (diff) | |
| download | cpython-7fafbc95c0c963438197c9a43fe893c4ea6fe759.zip cpython-7fafbc95c0c963438197c9a43fe893c4ea6fe759.tar.gz cpython-7fafbc95c0c963438197c9a43fe893c4ea6fe759.tar.bz2 | |
More cleanup: Move some demos into a dedicated Tools/demo dir, move 2to3 demo to Tools, and remove all the other Demo content.
Diffstat (limited to 'Demo/tkinter/guido/imagedraw.py')
| -rw-r--r-- | Demo/tkinter/guido/imagedraw.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Demo/tkinter/guido/imagedraw.py b/Demo/tkinter/guido/imagedraw.py deleted file mode 100644 index a168831..0000000 --- a/Demo/tkinter/guido/imagedraw.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Draw on top of an image""" - -from tkinter import * -import sys - -def main(): - filename = sys.argv[1] - root = Tk() - img = PhotoImage(file=filename) - w, h = img.width(), img.height() - canv = Canvas(root, width=w, height=h) - canv.create_image(0, 0, anchor=NW, image=img) - canv.pack() - canv.bind('<Button-1>', blob) - root.mainloop() - -def blob(event): - x, y = event.x, event.y - canv = event.widget - r = 5 - canv.create_oval(x-r, y-r, x+r, y+r, fill='red', outline="") - -main() |
