[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Re: BUG: problem with surface clipping region
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Re: BUG: problem with surface clipping region
- From: "Diego Essaya" <dessaya@xxxxxxxxx>
- Date: Thu, 15 Mar 2007 09:22:12 -0300
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 15 Mar 2007 08:22:36 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OngQiCv3xzYFUEWpPWtIbMLokOQLpDH+j/YawENtqAdi2hblsgfDjKR0qpM+OLkKFy6ezNjz6lSkmzuVaC0Moe8EyFkkYuknYqozyoj5ugOonnkfwFEsy25gbc6rkPDSGAGJMpQanJ4ynkVtC+Rc16zHm1ZOE2L59bmhvByMlxY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dJXJiL/mvYgEwEOZWEJHbYv1wiyl7OMKOkidMLipU891rr2JVhCihy1mbpNNhlFrBWSgpweGEJgwRfmPNLzP7mU5icJ0omt6qJ0rXSGTC1Q3KuWHAZziD2w1N2cwwX1Y76yTWjDDZDNLolHZhLMGVQ7jjLDHI2YAzJfqaXAbT9s=
- In-reply-to: <7b9498d90703121654i32c00efbpf86e7ba245bb9901@mail.gmail.com>
- References: <7b9498d90703121654i32c00efbpf86e7ba245bb9901@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
So, any hints about this? Can anyone confirm that this is a bug? If that is the case, I might find some spare time to try to make a patch (no promises here, I have never read the pygame source code :-).
I'm getting the same odd behavior on both Linux and Windows versions of pygame, using Python
2.4. Didn't try with 2.5.
Thanks!
Diego
On 3/12/07, Diego Essaya <dessaya@xxxxxxxxx> wrote:
I'm having this problem with the Surface.set_clip() method that appears to be a bug:
import pygame
print pygame.__version__
s = pygame.display.set_mode((800, 600))
r = pygame.Rect(10, 10, 10, 10)
s.set_clip(r)
print s.get_clip()
r.move_ip(10, 0)
print s.get_clip()
s.set_clip(None)
print s.get_clip()
This yields the following output:
1.7.1release
<rect(10, 10, 10, 10)>
<rect(10, 10, 10, 10)>
<rect(25708, 0, 0, 600)>
After this, the clip region of the display surface is garbled and operations on the surface fail. Running the script again yields a different garbled value.
I tried modifying the line with set_clip() with:
s.set_clip(pygame.Rect(r))
but this did not solve the problem.
Is this really a bug, or am I doing something wrong? Also, my apologies if this has been discussed before.
Thanks,
Diego