[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: Problem with display.update(rectangle_list)



Hi Michael,

The Surface.blit method returns the dirty rectangle that you pass to pygame.display.update.

Lenard


Michael Leach wrote:
To Rene, I am using 1.8.1 (typo!)

To Ian,
 I was under the impression that the rendered font's rect would also
be its coordinate location within the window. For example, I would
blit it to the display's surface and the get_rect would return the
exact area of the display that needed to be updated. Of course, this
is the first real pygame project I've done, so I could definitely be
wrong.

 This is the reason that I wanted to do dirty rectangle updating... it
seemed only slightly more complicated with a huge speed boost.

To Brian,
 Thanks for the tip about the events... this solved the differences
between my test script and the actual program. Unfortunately, now they
both act in the same strange manner as before: the dirty rectangles
don't seem to be updating unless I drag that part of the window out of
the screen and back.