Tkinter.create_dot()

Markus von Ehr markus.vonehr at ipm.fhg.de
Tue Jul 16 02:48:43 EDT 2002


-use the Python Imaging Library (PIL) to create an Image with all your
 dots and information you need
-put the Image in the Tkinter canvas

Markus

imports you need: Image, ImageTk, Tkinter

im = Image.new("I", (Width, Height))

# construct your Image like you want here

photoimage = ImageTk.PhotoImage(im)
canvas.create_image(0, 0, anchor=NW, image=photoimage)

Justin Shaw schrieb:
> 
> I'm using a Tkinter.Canvas to create a picture of thousands of dots.  I am
> using
> Tkinter.Canvas.create_line()
> with a line of length one for each dot which really seems to bog down the
> computer.
> 
> Is there a better way?
> 
> Thanks,
> Justin Shaw



More information about the Python-list mailing list