I have a simple Rectangle drawn on Canvas. For example:

from Tkinter import *
#
class Test(Frame):
    #-------------------------------------------------------------
    def __init__(self, master=None):
        Frame.__init__(self, master)
        Pack.config(self)
        self.createWidgets()
    #------------------------------------------------------------    
    def createWidgets(self):
        self.draw = Canvas(self, width=600, height=400)
        self.draw.create_rectangle(100, 100, 200, 150, fill="blue")
        self.draw.pack(side=LEFT)
#
test = Test()
test.mainloop()

Question:
=======

How can I retrieve the color on the Canvas AFTER the Rectangle is drawn, say, 
at the coordinate  (110,110)   ???

P.S. 

Of course if the Rectangle would be an Image (!!!)  I could do it with:

from PIL import Image
im = Image.open"Rectangle.jpg")
x=110
y=110
pix = im.load()
print pix[x, y]

But that's NOT what I want.



_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to