[Tkinter-discuss] canvas origin is off by 2 pixels, is this normal

stefanix stefan at nortd.com
Thu Jan 6 09:53:35 CET 2011


I just started using Tkinter and wanted to start using the canvas widget. I
am having a weird problem with the origin. Not sure if this is a bug or I am
missing something.

When I create a canvas with 200x100 pixels and then draw an ellipse into the
center (0,0, 200, 100) it is clipped by two pixels top and left and there is
space bottom and right of 3 pixels. In other words, I have to draw my
ellipse at (2,2,203,103) to perfectly fill out the canvas.

code looks something like:
c = Canvas(master, width=200, height=100, bg="black")
c.pack(side=TOP)
c.create_oval(2,2,203,103, fill="red")

Any ideas how I fix this,

/stefanix
-- 
View this message in context: http://old.nabble.com/canvas-origin-is-off-by-2-pixels%2C-is-this-normal-tp30603446p30603446.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.



More information about the Tkinter-discuss mailing list