acircle.getCenter() to (x,y) coordinates in Python

G Yu neptinizer101 at gmail.com
Sat Dec 23 16:30:29 EST 2017


I did try that.  The problem is that I already declared a point moving_object_center = (-555,-555), because that's the point I used as the center to draw the moving_object circle itself.  So the moving_object_center.getX() will return -555 no matter what I do.

That's why I need to calculate the center using some attribute of the circle, not the center point - because the circle moves, but the point that I declared as the initial center point will never change.

I'm not totally sure what you mean by "graphics library", but these are all the import statements I'm using at the beginning.

from graphics import *
import datetime
import random
from math import *



More information about the Python-list mailing list