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

Re: [pygame] Alternative to pygame.Surface.subsurface



You can create new surfaces, then blit with source rects and dest
rects. So basically make copies of the pieces you need from the
original, than you can ditch the original. If it's RGBA data, I seem
to recall you can temporarily turn off alpha blending with set_alpha
on the dest so it will copy the RGBA instead of blending.

On 10/18/07, Ronald Lew <ronald_lew@xxxxxxxxxxx> wrote:
>
>  Is there another way to get a portion of an image without having a
> reference to the parent?  I have a 100x100 surface and would like to have 4
> surfaces that takes 1/4 of the surface so the end result would have 4 boxes
> of 50x50.  Here's an example
>
> ---------
> | 1 | 2 |
> ---------
> | 3 | 4 |
> ---------
>
>
> Thanks.
>
> Ron
>
> ________________________________
> Peek-a-boo FREE Tricks & Treats for You! Get 'em!