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

Re: [pygame] subsurfaces outside of their parents



If I could have a subsurface that was refitted to be inside of the
surface, and have an origin so that it would emulate it being bigger,
with anything outside of it being clipped, then that would be perfect.
It seems that PyGame itself needs to at least get an origin feature,
and if it did it would be nice if the subsurface method would set
those values when appropriate.

On 11/11/05, Roger Ostrander <atiaxi@xxxxxxxxx> wrote:
> On 11/9/05, Forest Darling <fdarling@xxxxxxxxx> wrote:
> > I want this feature,
> > personally, for a widget drawing system involving subsurfaces.
>
>   I wrote some GUI code with SDL a while back that had a similar
> issue; I ended up not using subsurfaces, though:  I'd advocate looking
> into Surface.set_clip to make sure things which are drawn outside
> where you want them to be don't show up.  It takes a little wedging to
> get into the rendering queue but ends up working nicely once there.
>
> ( http://www.pygame.org/docs/ref/surface.html#Surface.set_clip )
>
>   Then again, if you do find a way of getting subsurfaces to act like
> that, I think it'd be a bit more elegant :)
>