Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from graphics import *
- def main():
- win = GraphWin()
- shape = Rectangle(Point(50,50), Point(70,70))
- shape.setOutline("red")
- shape.setFill("red")
- shape.draw(win)
- for i in range(9):
- p = win.getMouse()
- c = shape.getCenter()
- dx = p.getX() - c.getX()
- dy = p.getY() - c.getY()
- shape.draw(dx,dy)
- win.close()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement