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

Re: [pygame] "tint" a surface?



On Sat, Sep 19, 2009 at 3:30 PM, Eric Pavey <warpcat@xxxxxxxxx> wrote:
Based on your suggestion I tried
surface.fill(color, special_flags=BLEND_RGB_MULT)

And actually, it's working great.  From four lines to one, nice.

Thanks for the tip!
I like this method.  I actually didn't know surface.fill() took any other arguments...
On Sat, Sep 19, 2009 at 8:58 PM, <jasper@xxxxxxxx> wrote:
It's not Pygame strictly, but if you're using Pyopengl w/ Pygame, you can
pass such a tint as a "color" param when drawing a textured Quad in
Pyopengl, without needing to monkey with surfaces at all.
Or use glColor{3|4|}f()
-Jasper
Ian