Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. from graphics import *
  2.  
  3. def main():
  4. win = GraphWin()
  5. shape = Rectangle(Point(50,50), Point(70,70))
  6. shape.setOutline("red")
  7. shape.setFill("red")
  8. shape.draw(win)
  9. for i in range(9):
  10. p = win.getMouse()
  11. c = shape.getCenter()
  12. dx = p.getX() - c.getX()
  13. dy = p.getY() - c.getY()
  14. shape.draw(dx,dy)
  15. win.close()
  16. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement