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

Re: [pygame] blending edges



Robert Flemming wrote:

> On a purely cosmetic note I was thinking about a way to try and blend the
> edges of an image with the background.  After the recent discussion on
> clipping I thought that might be a way to do it.  Take an image surface and
> incrementally make it more opaque by changing the clipping area and resetting
> the alpha of it.  Well the clipping area doesn't seem to apply when dealing
> with surface.set_alpha so, so much for that idea.  It has no real purpose, but
> I thought it might make things look a bit prettier in an app I'm writing if
> this was possible.  Feel free to tell me I'm crazy now :)


i'd recommend going with Numeric python and the surfarray.pixels_alpha() 
function, which will let you fiddle with the alpha values for each pixel 
fairly easily. (and quickly)

gonna be a little tricky though, it'll be tough to make something that 
works well for all situations.



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