import pygame2
import time
rect = pygame2.Rect(50,50,10,10)
while True:
print("Left:" + str(rect.left) + ", Right:" + str(rect.right))
rect.centerx -= 10
time.sleep(0.2)
is a simple test case. As soon as rect.right becomes negative, Python raises an
"OverflowError: Python int too large to convert to C long"
If you substitute left and right to top and bottom, the same will happen when
bottom becomes negative.
rect = pygame2.Rect(50,50,10,10)
while True:
print("Left:" + str(rect.left) + ", Right:" + str(rect.right))
rect.move_ip((-10,0))
time.sleep(0.2)
This example uses move_ip(). Instead of raising an OverflowError, this
operation code makes rect.right wrap around silently.
Version: pgreloaded alpha 5, Windows 7, Python 3.1.2
If you need more information, I'm often hanging in #pygame, with nick MigoMipo.
Original issue reported on code.google.com by john.eri...@gmail.com on 21 Jul 2010 at 8:11
Original issue reported on code.google.com by
john.eri...@gmail.com
on 21 Jul 2010 at 8:11