[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Difficulty with Surface.set_clip()



> I now have a mostly-working mini-map. It does not let you browse around yet, 
> but it shows a properly scaled-down version of the main map. In addition, it 
> shows a white rectangle highlighting the on-screen portion of the map.

ok, i'm trying to make sure i understand what your code is trying
to do. to me it looks like the problem is you are setting the clip
area on the source surface, that's not right :]

you want to use Surface.set_clip() on the destination, then
blits/fills/draws can only happen inside that clipped area.
to me it looks like what you are trying to do is blit only
a portion of the source onto the destination. the Surface.blit()
function takes an optional third Rect argument which specifies a 
sub-region of the source to use in the blit.



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org